Jump to content

[SOLVED] Php Mysql query problem (WHERE and WHERE) !


nita

Recommended Posts

Hi

I would like to do query which is searching only records with "Menuideas" in subcategory column.

 

my code is :

$result1 = mysql_query("SELECT * FROM recipe WHERE subcategory='Menuideas' and WHERE name LIKE '%$search%' OR ingred LIKE '%$search%' ORDER BY name LIMIT $offset, $rowsPerPage");

 

i'm not sure if WHERE and WHERE is the correct syntax in this case ??

 

Need some help with this one... please

 

Nita

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.