Re: WHERE doesn't work

2006-04-23 Thread Tom Lobato
The code of insert_client.html which wasn't attached last mail: http://www.spalha.com.br/spalha/form_client.html Tom From: Tom Lobato [EMAIL PROTECTED] From: Peter Brawley [EMAIL PROTECTED] Tom, UPDATE command is not working for only the record that I want, but for all in the table.

Re: WHERE doesn't work

2006-04-23 Thread Peter Brawley
Tom, snip Maybe a comunication trouble... Let me confirm. Are you saying that http://www.spalha.com.br/spalha/DB_code.html http://www.spalha.com.br/spalha/insert_client_code.html are not the code Im having troubles? As the code Im having trouble were some secret or so? if ($yes){

Re: WHERE doesn't work

2006-04-23 Thread Tom Lobato
Solved =) From: Quentin Bennett [EMAIL PROTECTED] Have you tried turning on the logging on the MySQL server, and seeing exactly what command the server is receiving - it may be different from the one (you think) you are sending. Turning on the logging on the MySQL server, I saw PHP

WHERE doesn't work

2006-04-22 Thread Tom Lobato
From: Michael Stassen [EMAIL PROTECTED] With all due respect, there is almost certainly an error in your code. I've been on this list for years, and so far as I can recall, every instance of mysql appearing to do something strange from php turned out to be a flaw in the php code, not a problem

Re: WHERE doesn't work

2006-04-22 Thread Tom Lobato
From: [EMAIL PROTECTED] you really need to show your php code and the output from an echo of the update line so that people can try to spot what you're doing wrong. from what i've seen, people are basically just guessing at the issue with you saying tried that, didn't work. updating mysql

Re: WHERE doesn't work

2006-04-22 Thread Peter Brawley
Tom, UPDATE command is not working for only the record that I want, but for all in the table. I sees WHERE is not interpretated by Mysql server. At least the result is identic to it. For example, If my php execute UPDATE clientes SET tipo='r', nome_fantasia='cc', estado='24' WHERE

Re: WHERE doesn't work

2006-04-22 Thread Tom Lobato
From: Peter Brawley [EMAIL PROTECTED] Tom, UPDATE command is not working for only the record that I want, but for all in the table. I sees WHERE is not interpretated by Mysql server. At least the result is identic to it. For example, If my php execute UPDATE clientes SET

Re: WHERE doesn't work

2006-04-21 Thread Barry
Tom Lobato wrote: Hi! UPDATE command is not working for only the record that I want, but for all in the table. I sees WHERE is not interpretated by Mysql server. At least the result is identic to it. For example, If my php execute UPDATE clientes SET tipo='r',

Re: WHERE doesn't work

2006-04-21 Thread Tom Lobato
Writing echo p-.mysql_error().-P-.mysql_info().-p; below $result = mysql_query($command); gives the output: -- -Rows matched: 2 Changed: 0 Warnings: 0- So, it seems mysql doesnt get error. It simply ignores the WHERE. From: George Law [EMAIL PROTECTED] echo

Re: WHERE doesn't work

2006-04-21 Thread Tom Lobato
From: Barry [EMAIL PROTECTED] Tried: WHERE id = 5 ? Yes, same trouble 8-( Tom -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: WHERE doesn't work

2006-04-21 Thread Tom Lobato
From: George Law [EMAIL PROTECTED] How many rows are in the table, just 2? (ie - is it updating ALL the rows?) In the instant of this test, just 2, but as I have tested several times, with any number it behaves so, 2, 10, 15. As someone else on the list mentioned, maybe you need to

Re: WHERE doesn't work

2006-04-21 Thread Tom Lobato
Maybe it a bug of the php's mysql API? Tom -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: WHERE doesn't work

2006-04-21 Thread Jay Blanchard
[snip] Maybe it a bug of the php's mysql API? [/snip] Nope, I do this all of the time. Head on over to the PHP list and post your code and see what they say. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL

Re: WHERE doesn't work

2006-04-21 Thread Tom Lobato
From: Jay Blanchard [EMAIL PROTECTED] Nope, I do this all of the time. me too =) Head on over to the PHP list and post your code and see what they say. ok, I'll post there. Thank you Tom -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To

RE: WHERE doesn't work

2006-04-21 Thread Nicolas Verhaeghe
Normal. MySQL returns 0 changes when the data before and after the UPDATE is the same. -Original Message- From: Tom Lobato [mailto:[EMAIL PROTECTED] Sent: Friday, April 21, 2006 9:50 AM To: mysql@lists.mysql.com Subject: Re: WHERE doesn't work Writing echo p-.mysql_error().-P

RE: WHERE doesn't work

2006-04-21 Thread Nicolas Verhaeghe
Normal. MySQL returns 0 changes when the data before and after the UPDATE is the same. -Original Message- From: Tom Lobato [mailto:[EMAIL PROTECTED] Sent: Friday, April 21, 2006 9:50 AM To: mysql@lists.mysql.com Subject: Re: WHERE doesn't work Writing echo p-.mysql_error().-P

Re: WHERE doesn't work

2006-04-21 Thread Tom Lobato
Yes, but this output indeed was generated when I made no changes in the loaded fields of the web form. When I change something it outputs Changed: 2, for the case of 2 records in the table. From: Nicolas Verhaeghe [EMAIL PROTECTED] Normal. MySQL returns 0 changes when the data before and

RE: WHERE doesn't work

2006-04-21 Thread Nicolas Verhaeghe
- From: Tom Lobato [mailto:[EMAIL PROTECTED] Sent: Friday, April 21, 2006 12:11 PM To: mysql@lists.mysql.com Subject: Re: WHERE doesn't work Yes, but this output indeed was generated when I made no changes in the loaded fields of the web form. When I change something it outputs Changed

RE: WHERE doesn't work

2006-04-21 Thread Nicolas Verhaeghe
- From: Tom Lobato [mailto:[EMAIL PROTECTED] Sent: Friday, April 21, 2006 12:11 PM To: mysql@lists.mysql.com Subject: Re: WHERE doesn't work Yes, but this output indeed was generated when I made no changes in the loaded fields of the web form. When I change something it outputs Changed

Re: WHERE doesn't work

2006-04-21 Thread Tom Lobato
From: Nicolas Verhaeghe [EMAIL PROTECTED] Ok but what is the problem then? WHERE doesn't work. Iwrite WHERE in the command for UPDATE exactily one record, defined by id = $id, and mysql server UPDATE all the records in the table. Also are you taking care of converting the single

RE: WHERE doesn't work

2006-04-21 Thread Nicolas Verhaeghe
that way we'll see what is wrong. Maybe the $id variable is not replaced with the proper content. -Original Message- From: Tom Lobato [mailto:[EMAIL PROTECTED] Sent: Friday, April 21, 2006 2:31 PM To: mysql@lists.mysql.com Subject: Re: WHERE doesn't work From: Nicolas Verhaeghe [EMAIL

Re: WHERE doesn't work

2006-04-21 Thread Tom Lobato
From: Nicolas Verhaeghe [EMAIL PROTECTED] Echo the UPDATE query itself and then copy/paste it here that way we'll see what is wrong. I already tried it. See some msgs before this. No sucess. When I paste the exactily same command to the mysql client, all works fine (only the right record

Re: WHERE doesn't work

2006-04-21 Thread Michael Stassen
Tom Lobato wrote: From: Nicolas Verhaeghe [EMAIL PROTECTED] Echo the UPDATE query itself and then copy/paste it here that way we'll see what is wrong. I already tried it. See some msgs before this. No sucess. When I paste the exactily same command to the mysql client, all works fine

WHERE doesn't work

2006-04-20 Thread Tom Lobato
Hi! UPDATE command is not working for only the record that I want, but for all in the table. I sees WHERE is not interpretated by Mysql server. At least the result is identic to it. For example, If my php execute UPDATE clientes SET tipo='r', nome_fantasia='cc', estado='24'

RE: WHERE doesn't work

2006-04-20 Thread Jay Blanchard
[snip] UPDATE command is not working for only the record that I want, but for all in the table. I sees WHERE is not interpretated by Mysql server. At least the result is identic to it. For example, If my php execute UPDATE clientes SET tipo='r', nome_fantasia='cc', estado='24'

Re: WHERE doesn't work

2006-04-20 Thread Tom Lobato
From: Jay Blanchard [EMAIL PROTECTED] More of a PHP question. Echo the UPDATE statement to the browser so that you can see what it looks like. It is what I did. As I explain in the mail, I executed the command extracted from the browser. The command is: UPDATE clientes SET tipo='r',

RE: WHERE doesn't work

2006-04-20 Thread George Law
@lists.mysql.com Subject: Re: WHERE doesn't work From: Jay Blanchard [EMAIL PROTECTED] More of a PHP question. Echo the UPDATE statement to the browser so that you can see what it looks like. It is what I did. As I explain in the mail, I executed the command extracted from the browser. The command