Re: [PHP-DB] grabbing data and auto email set users

2006-04-10 Thread JeRRy
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)

Re: [PHP-DB] grabbing data and auto email set users

2006-04-10 Thread Chris
JeRRy wrote: 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)

Re: [PHP-DB] grabbing data and auto email set users

2006-04-10 Thread Chris
JeRRy wrote: 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)

Re: [PHP-DB] grabbing data and auto email set users

2006-04-10 Thread JeRRy
Okay, but still not working... is NULL the same as ' '? Or does NULL have to be the inserted value in the db? J Chris [EMAIL PROTECTED] wrote: JeRRy wrote: Hi, Okay I played with the code a bit and ended up with this, it does NOT produce errors but it's not doing

Re: [PHP-DB] grabbing data and auto email set users

2006-04-10 Thread Chris
JeRRy wrote: Okay, but still not working... is NULL the same as ' '? Or does NULL have to be the inserted value in the db? Null means unknown - so completely different to ' ' or ''. How was your table created? What do you get if you run that query through phpmyadmin: select username

Re: [PHP-DB] grabbing data and auto email set users

2006-04-10 Thread JeRRy
Hi, Ahh okay I thought NULL was blank. Okay I understand, therefore, hehe, I fixed it. snip $query = select username from round3 where misc=''; fixed it, the email got sent. Had to change a few strings also to match my database which I was not aware of. Forgot

Re: [PHP-DB] grabbing data and auto email set users

2006-04-10 Thread Chris
JeRRy wrote: Hi, Ahh okay I thought NULL was blank. Okay I understand, therefore, hehe, I fixed it. snip $query = select username from round3 where misc=''; fixed it, the email got sent. Had to change a few strings also to match my database which I was not aware of. Forgot it

Re: [PHP-DB] grabbing data and auto email set users

2006-04-10 Thread JeRRy
Okay I have the emails to work now, thanks so much Chris. But now I have encountered another problem, I hope you don't mind helping, I am obviously missing again something basic. Basic than before. I have this code: $result = mysql_query(SELECT `nickname` FROM tipping WHERE 1

[PHP-DB] Result set in different columns

2006-04-10 Thread Mark Bomgardner
I am trying to work through some display logic where I want to display a results set from a database query into to columns in a table, but I can't see to get it correct. Example; I want to loop through the months of the year and display them like this; January

RE: [PHP-DB] Result set in different columns

2006-04-10 Thread Bastien Koert
$cols = 2; echo tabletr; while ($rows = mysql_fetch_array($result)) { if (($cols % 2) == 0 ){ echo /trtr; } echo td.$rows['something']./td; $c++; } echo /tr/table; bastien From: Mark Bomgardner [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Php-Db php-db@lists.php.net Subject:

RE: [PHP-DB] grabbing data and auto email set users

2006-04-10 Thread Dwight Altman
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

Re: [PHP-DB] grabbing data and auto email set users

2006-04-10 Thread Chris
JeRRy wrote: Okay I have the emails to work now, thanks so much Chris. But now I have encountered another problem, I hope you don't mind helping, I am obviously missing again something basic. Basic than before. I have this code: $result = mysql_query(SELECT `nickname` FROM tipping WHERE