Jump to content

can not use alias on PHP


gurulay

Recommended Posts

please somebody help me, i don't know what's wrong with the following code...

if i don't use alias, it's ok, but if i use alias on query statement, it doesn't display anything.

 

$sql='SELECT u.name FROM user u';

$result=mysql_query($sql) or die(mysql_error());

 

while($row=mysql_fetch_array($result))

{

  echo $row['u.name'];

}

 

 

thanks in advanced

Link to comment
https://forums.phpfreaks.com/topic/120451-can-not-use-alias-on-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.