RE: [PHP] Function Problem (Long-ish)

2004-01-13 Thread Dave Carrera
-Original Message- From: Vincent Jansen [mailto:[EMAIL PROTECTED] Sent: 13 January 2004 13:05 To: 'Dave Carrera'; 'Richard Davey' Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Function Problem (Long-ish) I doubt that... MySQL says: Mixing of GROUP columns (MIN(),MAX(),COUNT()...) w

RE: [PHP] Function Problem (Long-ish)

2004-01-13 Thread Vincent Jansen
y' Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Function Problem (Long-ish) Thanks for the reply Richard. If I use this sql in my func: $sql = mysql_query("select count(fieldtocount) as cnt, sum(fieldforsum) as total from $tab3 where fieldtocompare =\"$varcomparedwith\"");

RE: [PHP] Function Problem (Long-ish)

2004-01-13 Thread Dave Carrera
I am puzzled why and if you or the list can help I would appreciate it. Thank you Dave C -Original Message- From: Richard Davey [mailto:[EMAIL PROTECTED] Sent: 13 January 2004 12:48 To: Dave Carrera Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Function Problem (Long-ish) Hello Dave, Tue

Re: [PHP] Function Problem (Long-ish)

2004-01-13 Thread Jason Wong
On Tuesday 13 January 2004 20:34, Dave Carrera wrote: [snip] > My Question is Why ? > > Any help is a appreciated and I thank you fully in advance. You're not checking for errors. Incorporate error checking code and make use of mysql_error(). -- Jason Wong -> Gremlins Associates -> www.gremli

Re: [PHP] Function Problem (Long-ish)

2004-01-13 Thread CPT John W. Holmes
From: "Dave Carrera" <[EMAIL PROTECTED]> > I get a Warning: > mysql_fetch_array(): supplied argument is not a valid MySQL result resource Whenever you get this warning it's because your query failed for some reason and you're trying to use a result that's not valid. Use mysql_error() to see wha

Re: [PHP] Function Problem (Long-ish)

2004-01-13 Thread Richard Davey
Hello Dave, Tuesday, January 13, 2004, 12:34:33 PM, you wrote: DC> sql = mysql_query("select *, count(id) as cnt from table where DC> somefield=\"somevar\""){ It's nothing to do with your function, simply that your SQL is invalid. -- Best regards, Richardmailto:[E