|
First off, is 'visitors' and 'TABLE_CUSTOMERS' defined constants? If the table name actually is 'visitors' it should be withing the string, as in
"select count(*) as count from visitors where receive = '1' "
If it is a variable you have forgotten the $, then it should be $visitors. The same thing goes for TABLE_CUSTOMERS. But since constants are normally made in upper case, I guess it actually is a constant(?).
Now to your question:
In your page, is the code written as it is above, with the two queries written next to each other? Cause you are storing the result in the same variable ($mail_query), so only the last one will be saved.
Is there any records in the TABLE_CUSTOMERS table? If there aren't any rows the count() will return zero. And are there any records with the field customers_newsletter set to '1'?
Finally, perhaps the most important question, are you getting any errors or warnings? If you are not, make sure you are not surpressing error messages. If there are still no errors the probelm probably lies in the database tables, perhaps there aren't any rows.
__________________
34343639363436653237373432303635373837303635363337 34323037343638363137343263323036343639363432303739 366637353366
|