How about:
$result = mysql_query($query);
while ($row = mysql_fetch_assoc($result)) {
instead of your line 6 and 7?
And why are you going back to db_query on line 9 instead of staying with
mysql_query?
Also, you might want to check $num_rows = mysql_num_rows($result);
instead of
line 10 $has_tipped = mysql_query($result_two);
and line 12 if (empty($has_tipped)) {
or do a while ($row = mysql_fetch_assoc($result_two)) {
(notice $result_two here) enclosing the mail command.
To recap:
Get a $result set from the mysql_query()
Get a $row from a while ($row = mysql_fetch_assoc($result)) {
-----Original Message-----
From: JeRRy [mailto:[EMAIL PROTECTED]
Sent: Monday, April 10, 2006 2:37 AM
To: Chris
Cc: [email protected]
Subject: Re: [PHP-DB] grabbing data and auto email set users
Hi,
Okay I played with the code a bit and ended up with this, it does NOT
produce errors but it's not doing anything. Connects to the db but does not
do the mail out. Maybe I missed something said before, but here you go, the
link below with the code. (it's probably basic)
http://pastebin.com/650846
J
Chris <[EMAIL PROTECTED]> wrote:
JeRRy wrote:
> Hi,
>
> Okay I must be missing something here.
>
> I changed it to "mysql_query" and no errors produce however no emails
> are sent either. After cross-checking back and fourth with my db the
> entries are correct.
>
> A connection is made and establlished. maybe I need to place some eror
> recording to see where it's failing.
>
> I can't seem to get it to work, changed a heap of code but nothing budges.
>
> I can send the code I have and table structure if you want.
Post it on http://www.pastebin.com and send us the url.
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php