MySQL Forums
Forum List  »  Newbie

Search a cell for a particular value
Posted by: David Fischetti
Date: May 24, 2005 11:18PM

I could really use some expert advice here. My PHP/mySQL capabilites are limited and I cant figure this out...

I am using ListMessenger as a newsletter application. It tracks all emails that were sent out in a table called "lm_queue". In that table is cell called "target". Within "target" is a string of information that looks similar to this

a:1:{i:0;s:1:"3";}

I don't know what most of it means, but I do know that the value of "3" in there is what I need to check for.

Currently, the code I have that reads the DB and lists all emails in the queue that were sent successfully looks like this...

$result = mysql_query("SELECT * FROM `lm_queue`, `lm_messages` WHERE `lm_queue`.`message_id` = `lm_messages`.`message_id` AND `status`='Complete' GROUP BY 'message_id' ORDER BY `lm_queue`.`date` DESC");

But now I want to be able to just list messages sent to a particular group "3". I know that I need to add another AND clause in there that looks for the cell called "target" within the "lm_queue" table and check for the group id "3" in the target cell ...for example:

That array in the "target" cell is beyond my abilities in PHP and mySQL to be able to drill down to that "3". Can anyone help me write the line that allows me to look in that cell for the value of "3".

Any help would greatly be appreciated!

Thanks

Fish

Options: ReplyQuote


Subject
Written By
Posted
Search a cell for a particular value
May 24, 2005 11:18PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.