Query Empty on page not im phpmyadmin

Query Empty on page not im phpmyadmin

am 31.10.2007 21:11:53 von Peter

Hello all,

I don't get it, when i use the code below I get a "Query empty", however
when I enter the myql statement in phpmyadmin i get the result i want...
what am i doing worng?

$msyql = "SELECT DATE_FORMAT(d_date, '%M %e, %Y') as date FROM `pages`
WHERE id_pages = 1";

echo $mysql;

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

while(list($date)=mysql_fetch_row($sql_date)){

echo "The date of this row is: $date";

}



Regards,
Peter

Re: Query Empty on page not im phpmyadmin

am 31.10.2007 22:04:20 von Peter

msyql instead of mysql

darn typos....


> Hello all,
>
> I don't get it, when i use the code below I get a "Query empty", however
> when I enter the myql statement in phpmyadmin i get the result i want...
> what am i doing worng?
>
> $msyql = "SELECT DATE_FORMAT(d_date, '%M %e, %Y') as date FROM `pages`
> WHERE id_pages = 1";
>
> echo $mysql;
>
> $result = mysql_query($mysql) or die (mysql_error());
>
> while(list($date)=mysql_fetch_row($sql_date)){
>
> echo "The date of this row is: $date";
>
> }
>
>
>
> Regards,
> Peter
>
>