Jump to content

[SOLVED] Problem with query (noobie)


spillage

Recommended Posts

Hi,

 

I have this small query in my page:

mysql_select_db("promo", $con);

$result = mysql_query("SELECT * FROM email WHERE printer LIKE '$printer'");

while($row = mysql_fetch_array($result))

 

My date base has a field called 'printers' and has data similar to 'hp,epson'.

 

What I am struggling with is why this query is only pulling from the db line where 'printers' is only a single input. If $printers = 'hp'

then 'hp,epson' is not echoed but 'hp' will be.

Spent a couple hours trying diffrent things both google and referencing a couple of books but have hit a brick wall.

 

Any help would be appriciated.

 

Cheers,

 

Noobie Spill.

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