i have a problem with a query in a php file.
I have a query that retrieves an e-mail address, it works about right, but when it sends the email, the address is added twice.
SELECT email FROM jos_users WHERE id=$i
$i is a number that auto increments.
i have a for to check each user id to see if a email should be sent.
Any ideas?
thanks,
Sebastian
If your list of ids is not too long, you could use something like this:
If you get a packet too long error, you can either increase the packet size, use a temporary table or keep track of the emails in your PHP application. Here is an example using temporary tables: