Re: [PHP] db query not working

2007-03-07 Thread David Robley
Satyam wrote: > It is an old guy thing, at least in my case (trivia: I was born the day > after the ENIAC was turned off) Young kids these days :-) I was born the month before it was turned _on_! Cheers -- David Robley Why do we read left to right yet turn pages right to left? Today is Boo

Re: [PHP] db query not working

2007-03-07 Thread Ed Curtis
It is an old guy thing, at least in my case (trivia: I was born the day after the ENIAC was turned off) Aha! October 3, 1955 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] db query not working

2007-03-07 Thread Satyam
- Original Message - From: "Jochem Maas" <[EMAIL PROTECTED]> Satyam wrote: I saw two people pointing two errors on the SQL insert statement which you would have found yourself had you put the 'or die()' at the end of the query, as someone else suggested. Do never leave any query with

Re: [PHP] db query not working

2007-03-07 Thread Jochem Maas
Satyam wrote: > I saw two people pointing two errors on the SQL insert statement which > you would have found yourself had you put the 'or die()' at the end of > the query, as someone else suggested. Do never leave any query without > the 'or die()' after it (or any other means to check if mysql_q

Re: [PHP] db query not working

2007-03-07 Thread Ed Curtis
Satyam wrote: I saw two people pointing two errors on the SQL insert statement which you would have found yourself had you put the 'or die()' at the end of the query, as someone else suggested. Do never leave any query without the 'or die()' after it (or any other means to check if mysql_query

Re: [PHP] db query not working

2007-03-07 Thread Satyam
'ballistic' code: code you have no control over once it launches. Guided missiles are far better. Anyway, you got it because I had time to rant about this. Satyam - Original Message - From: "Ed Curtis" <[EMAIL PROTECTED]> To: Sent: Wednesday, March 07, 20

Re: [PHP] db query not working as expected

2007-03-07 Thread Stut
Ed Curtis wrote: mysql_query ("INSERT INTO tmphitsmag (magazine) VALUES ('$magazine_path[2]')"); Replace that with this... mysql_query ("INSERT INTO tmphitsmag (magazine) VALUES ('".mysql_real_escape_string($magazine_path[2])."')"); -St

Re: [PHP] db query not working as expected

2007-03-07 Thread cajbecu
try: mysql_query ("INSERT INTO tmphitsmag (magazine) VALUES ('{$magazine_path[2]}')"); cajb. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] db query not working as expected

2007-03-07 Thread Tijnema !
On 3/7/07, Ed Curtis <[EMAIL PROTECTED]> wrote: I have this code: mysql_connect ($local_host, $local_user, $local_pass); mysql_select_db ($local_db); mysql_query ("DELETE FROM tmphitsmag"); $result = mysql_query ("SELECT DISTINCT company FROM view_log WHERE company != ''"); if ($row = mysql_

Re: [PHP] db query not working as expected

2007-03-07 Thread Tijnema !
On 3/7/07, Ed Curtis <[EMAIL PROTECTED]> wrote: I have this code: mysql_connect ($local_host, $local_user, $local_pass); mysql_select_db ($local_db); mysql_query ("DELETE FROM tmphitsmag"); $result = mysql_query ("SELECT DISTINCT company FROM view_log WHERE company != ''"); if ($row = mysql_

[PHP] db query not working as expected

2007-03-07 Thread Ed Curtis
I have this code: mysql_connect ($local_host, $local_user, $local_pass); mysql_select_db ($local_db); mysql_query ("DELETE FROM tmphitsmag"); $result = mysql_query ("SELECT DISTINCT company FROM view_log WHERE company != ''"); if ($row = mysql_fetch_array($result)) { do {

Re: [PHP] db query not working

2007-03-07 Thread Tijnema !
On 3/7/07, Ed Curtis <[EMAIL PROTECTED]> wrote: I have this code: mysql_connect ($local_host, $local_user, $local_pass); mysql_select_db ($local_db); mysql_query ("DELETE FROM tmphitsmag"); $result = mysql_query ("SELECT DISTINCT company FROM view_log WHERE company != ''"); if ($row = mysql_

RE: [PHP] db query not working

2007-03-07 Thread Jim Moseby
> > It dumps the table fine, works the explode, outputs the string in the > echo command the way I expect, but doesn't place the value in > tmphitsmag > table. Does it insert an empty record? JM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/uns

[PHP] db query not working

2007-03-07 Thread Ed Curtis
I have this code: mysql_connect ($local_host, $local_user, $local_pass); mysql_select_db ($local_db); mysql_query ("DELETE FROM tmphitsmag"); $result = mysql_query ("SELECT DISTINCT company FROM view_log WHERE company != ''"); if ($row = mysql_fetch_array($result)) { do {