Jump to content

[SOLVED] Function not working


Efrem

Recommended Posts

 function getNewMailAmt($uid) {
  global $database;
  $q = "SELECT * FROM privmsgs WHERE user_to='$uid' AND read='0'";
  $r = mysql_query($q, $database->connection);
  return mysql_numrows($r);
}

 

Mmmk for the query i can do just

  $q = "SELECT * FROM privmsgs WHERE user_to='$uid'";

And it will work just fine, but when I add the AND, which i really need, it wont work.

 

Any ideas?

 

Also.. There are 3 rows in the DB that this should correspond with.

Link to comment
https://forums.phpfreaks.com/topic/117233-solved-function-not-working/
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.