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
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 returns anythi

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_

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

RE: [PHP] DB Query

2004-06-05 Thread Daniel Clark
gt;-Original Message- >>From: Daniel Clark [mailto:[EMAIL PROTECTED] >>Sent: Saturday, June 05, 2004 11:41 AM >>To: bskolb; [EMAIL PROTECTED]; [EMAIL PROTECTED] >>Subject: Re: [PHP] DB Query >> >>Run an explain plan, but my first quess would be to add indexes to

Re: [PHP] DB Query

2004-06-05 Thread Curt Zirzow
* Thus wrote bskolb ([EMAIL PROTECTED]): > I'm trying to optimize a query that in the first example is taking too long > to run. > > This is my existing working query: > $sql = "SELECT count(*) as cnt, id FROM `mYTable` WHERE c1 not in (1,16,36) > and c2 not in (1,16,36) and c3 not in (1,16,36) a

RE: [PHP] DB Query

2004-06-05 Thread bskolb
cution time. FYI, there are some 3 million records. -Original Message- From: Marek Kilimajer [mailto:[EMAIL PROTECTED] Sent: Saturday, June 05, 2004 12:56 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] DB Query bskolb wrote: > I'm trying to optimize a query that in

Re: [PHP] DB Query

2004-06-05 Thread Marek Kilimajer
bskolb wrote: I'm trying to optimize a query that in the first example is taking too long to run. This is my existing working query: $sql = "SELECT count(*) as cnt, id FROM `mYTable` WHERE c1 not in (1,16,36) and c2 not in (1,16,36) and c3 not in (1,16,36) and c4 not in (1,16,36) and c5 not in (1

RE: [PHP] DB Query

2004-06-05 Thread bskolb
Explain plan? Due to the number of records, any indexes I added have significantly delayed the query. -Original Message- From: Daniel Clark [mailto:[EMAIL PROTECTED] Sent: Saturday, June 05, 2004 11:41 AM To: bskolb; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] DB Query Run

Re: [PHP] DB Query

2004-06-05 Thread Daniel Clark
Run an explain plan, but my first quess would be to add indexes to c1, c2, c3, c4, c5 fields. >>I'm trying to optimize a query that in the first example is taking too long >>to run. >> >>This is my existing working query: >>$sql = "SELECT count(*) as cnt, id FROM `mYTable` WHERE c1 not in (1,16,