At 12:38 -0700 on 05/27/2004, Daevid Vincent wrote about Re: Feature
Request: UPDATE 'error codes' or mysql_affected:
REPLACE INTO won't work, as I need the previous record (hence the update). I
store the first and last time I saw a node, amongst other info. REPLACE
would delete that data.
REPLAC
Daevid Vincent wrote:
Well, my "hack" (which is sort of like what you suggest) is to change my
primary key from just an auto_increment 'id' field to a combination of two
other fields (mac/scanner_id) that I know must be unique. Then I rely upon
the fact that mySQL will not allow a duplicate PK. (I
PLACE
would delete that data.
http://daevid.com
> -Original Message-
> From: Steve Meyers [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 27, 2004 7:42 AM
> To: Daevid Vincent
> Cc: [EMAIL PROTECTED]
> Subject: Re: Feature Request: UPDATE 'error codes' or
> mysql_a
1" and if
mysql_affected_rows == 0, then I know nothing was updated and so I do an
INSERT. I find this is much cleaner and the majority of the time, I'm going
to do UPDATES, so I didn't want to waste a SELECT (even though I hear
they're "cheap"). I'm doing these qu
|INSERT| Syntax
<http://dev.mysql.com/doc/mysql/en/INSERT.html>.
http://dev.mysql.com/doc/mysql/en/REPLACE.html
HTH,
Robert J Taylor
[EMAIL PROTECTED]
Daevid Vincent wrote:
I'm developing a program where I try an "UPDATE ... LIMIT 1" and if
mysql_affected_rows == 0, then I kno
I'm developing a program where I try an "UPDATE ... LIMIT 1" and if
mysql_affected_rows == 0, then I know nothing was updated and so I do an
INSERT. I find this is much cleaner and the majority of the time, I'm going
to do UPDATES, so I didn't want to waste a SELECT (e
At 12:15 +0200 5/12/02, Inbal Ovadia wrote:
>Hi
>I build a batch file that run a few sql queries.
>I want to know the results (how many rows affected)
>but it doesn't recognize the method mysql_affected_rows.
>What should i use to get the results?
>Thanks
mysql_affected_
Hi
I build a batch file that run a few sql queries.
I want to know the results (how many rows affected)
but it doesn't recognize the method mysql_affected_rows.
What should i use to get the results?
Thanks
-
Before po
, although working fine on Win.
Anyway, after correcting this problem, I noticed that Mysql_Affected_Rows()
works fine for SELECT also, retrieving correct number found rows , ( even manual
indicating to be applied for UPDATE,INSERT,DELETE) , whenever
Mysql_Num_Rows($set) returns always = 0.
I don
At 1:50 AM -0200 11/15/01, M wrote:
>Hello, I work PHP environment. I use to call Mysql_Affected_Rows to get
>number of records retrieved by SELECT commands.
>This works fine for some scripts, but now I got a script which returns
>qtty records = -1, even I know these records exist
Miguel,
What you want is mysql_num_rows() after a SELECT call.
John
>Hello, I work PHP environment. I use to call Mysql_Affected_Rows to get
>number of records retrieved by SELECT commands.
>This works fine for some scripts, but now I got a script which returns
>qtty records
Hello, I work PHP environment. I use to call Mysql_Affected_Rows to get
number of records retrieved by SELECT commands.
This works fine for some scripts, but now I got a script which returns
qtty records = -1, even I know these records exists.
I review Mysql manual and notice this function just
12 matches
Mail list logo