Jump to content

[SOLVED] mysql query problem !!!


nita

Recommended Posts

Hallo

 

I need some help on spotting a bug or another solution in the following mysql query:

i have table recipecat and columns - id, group, name...

 

$result = mysql_query("SELECT * FROM recipecat WHERE group='Menuideas' ORDER BY name") or die(mysql_error());
while($row = mysql_fetch_array( $result )) 
{
echo "<A href='menuideas.php?cat=$row[name]'>$row[name]</a><br>";
}

 

getting following error from the browser:

 

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'group='Menuideas' ORDER BY name' at line 1

 

My php/mysql version is

phpMyAdmin 2.7.0-pl1

MySQL 4.0.24

 

I have been using similar form before with no problems, there mus be something wrong i do,

i cant spot it.

 

Thanks a lot for your advice

 

Nita

Link to comment
https://forums.phpfreaks.com/topic/52189-solved-mysql-query-problem/
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.