Page 1 of 1

fecth result details

Posted: Wed Mar 05, 2008 5:10 am
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