Jump to content

my = qry produces LIKE results?


wmguk

Recommended Posts

hey,

 

I have a simple qry. display everything in the notifications table, where the touser is either the username or "ALL" and the date is today....

 

I'm using:

 

$time = time(); 
$day = date('j', $time);
$month = date('m', $time);

$todosql = "SELECT * FROM notifications WHERE MONTH(timedate)='$month' && DAY(timedate)='$day' AND touser='$username' || touser = 'all'"; 
$todoresult = mysql_query($todosql); 
while ($row = mysql_fetch_array($todoresult)) {

however if my username is Drew, i see the results for Andrew too...

 

any ideas?

Link to comment
https://forums.phpfreaks.com/topic/154876-my-qry-produces-like-results/
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.