fecth result details

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ganeshfriends
Forum Newbie
Posts: 2
Joined: Tue Feb 19, 2008 5:50 am

fecth result details

Post by ganeshfriends »

dear friends

i want to know some of details in php

Code: Select all

 
$sql="select * from texttable"
$result=mysql_query($sql);
 
while(list($key,$rows)=each($result))
{
$output=mysql_result($result,0,'column name');
}
 
 
this is the one way of fectch result from table in the database..

this manner there is any other sysntax for fetch the output from the table in the database..

like whiile($row=mysql_fetch_array($result)){
echo $row['user_name'];
}

this sort any other examples if you..plz share with me..

thanks in advance
Post Reply