I haven't seen the curly braces in:
[code]
... from {$database['table']} where ...
[/code/
used that way in php before. I would tend to do:
Code:
... from ".$database['table']." where ...
Also the:
Code:
... where `account`= ...
is using the weird MS single apostrophes. I would miss them out and do:
Code:
... where account= ...
Other than that I can't see anything else particularly wrong.
Altered code:
Code:
function PutInTheQueue($email)
{
global $database;
if(
mysql_fetch_row(
mysql_query(
"select
*
from
".$database['table']."
where
account'=".mslash($email['account'])."
AND
message_id=".mslash($email['message_id'])
)
)
)
{
return true;//already in queue
}
$email['duetime'] = date("Y-m-d H:i:s",$email['duetime']);
return mysql_query(InsertSQL($database['table'],$email));
}
//------------------------------------------------------------------------------
function mslash($s)
I can't test it as I don't have access to your DB. let me know how it goes.