# mySql help

**URL:** <https://forum.kirupa.com/t/mysql-help/230856>\
**Category:** Uncategorized\
**Created:** [June 29, 2007, 1:11pm UTC](https://forum.kirupa.com/t/mysql-help/230856 "2007-06-29T13:11:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wo1olf](https://avatars.discourse-cdn.com/v4/letter/w/278dde/32.png) [@wo1olf](https://forum.kirupa.com/u/wo1olf)\
**Post date:** [June 29, 2007, 1:11pm UTC](https://forum.kirupa.com/t/mysql-help/230856/1 "2007-06-29T13:11:51Z")

</div>

## i have a db where i want to take informatioin from. here is the structure of the table id | page | text

1 | index | welcome  
2 | page | texte page  
and so on.  
when some one click on a link i want to go to this table and take the corresponding text.  
for the moment here is what i am doing

$result = mysql\_query(“SELECT \* FROM contenu”);  
while($row = mysql\_fetch\_array($result))  
{  
if($row[‘page’] == $contenu)  
// $contenu is the variable that has the name of the page to display  
{  
echo $row[‘texte’];  
}  
}  
My concern is that if there is a lot of text and more page then i will have to take all the content. I know that there is a way that i can just get information i want without reading the whole table. Can anyone help me with that?

The other thing is when someone click on a link, there is a paramater passed through the web url display, i used $\_REQUEST to get that parameter. Is it the right way to do it or there is even better?
