I am working on some php that will post the date an email is sent to a database. Each recipient of that email must have their date updated.
The first string should select an array of sub_id (subscriber id) from a data table for messages.
This is what I have so far:
Which gives message:PHP Code:$mysub=array("SELECT sub_id FROM mail_sub_msgs WHERE msg_id = ". $mrecord['msg_id']);
foreach ($mysub as $value)
var_dump($value);
$ldatabase->execute_query("UPDATE mail_subscribers SET last_sent=now() WHERE sub_id = ($mysub[0])");
string(58) "SELECT sub_id FROM mail_sub_msgs WHERE msg_id = 244" }
This only works for one email address but if there is more than one, nothing is updated!
I don't see why it is not printing a list of values for multiple sub_id.
Is there not something I have to do to run the string & SELECT the values before the var_dump()...
Any help is appreciated, this is my first week with php.



Reply With Quote

Bookmarks