-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
Hello Dave,
Tuesday, January 13, 2004, 12:57:35 PM, you wrote:
DC> If I use this sql in my func:
DC> $sql = mysql_query("select count(fieldtocount) as cnt, sum(fieldforsum) as
DC> total from $tab3 where fieldtocompare =\"$varcomparedwith\"");
DC> Then all is fine and works as expected.
Is this
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\"");
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
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
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
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
Hi List,
I have a self-made function that uses a MySql statement something like this:
Function MyFunc(){
sql = mysql_query("select * from table where somefield=\"somevar\""){
while(blah blah){
$var ="blah blah";
}
}
return $blah;
}
This works ok but if I add a bit to the sql then I ge
8 matches
Mail list logo