RE: [PHP] Php mysql update

2008-12-29 Thread admin
; To: php-general@lists.php.net> Date: Mon, 29 Dec 2008 12:05:37 -0500> Subject: [PHP] Php mysql update> > Okay maybe i have just forgot.> I am trying to update the database and do a +1 to a int field without pulling the data and adding 1 to it and sticking it back in.> &

Re: [PHP] Php mysql update

2008-12-29 Thread John Corry
Wouldn't it be: mysql_query("UPDATE database set Field = Field+1 WHERE Criteria='Criteria'"); Note: no '' around +1, = operator John Corry ad...@buskirkgraphics.com wrote: > Okay maybe i have just forgot. > I am trying to update the database and do a +1 to a int field without pulling > the data

RE: [PHP] Php mysql update

2008-12-29 Thread Gautier Di Folco
Hello, you have to do : $dwsl = mysql_query('UPDATE database SET "Field"="Field"+1 WHERE "Criteria"=\'Criteria\'');> From: ad...@buskirkgraphics.com> To: php-general@lists.php.net> Date: Mon, 29 Dec 2008 12:05:37 -0500> Subject:

[PHP] Php mysql update

2008-12-29 Thread admin
Okay maybe i have just forgot. I am trying to update the database and do a +1 to a int field without pulling the data and adding 1 to it and sticking it back in. Someone refresh me on this please. I think it is something like. $dwsl = mysql_query("UPDATE database set Field='+1' WHERE Criteria='Cr

Re: [PHP] MySQL update killed my login...

2006-01-03 Thread William Stokes
Thanks! -W "M" <[EMAIL PROTECTED]> kirjoitti viestissä:[EMAIL PROTECTED] > It seems the upgrade was from Mysql 4.0. PASSWORD() function changed > between 4.0 and 4.1, it uses longer hashes now. You can still use > OLD_PASSWORD() function instead. > > William Stokes wrote: >> Hello, >> >> My IS

Re: [PHP] MySQL update killed my login...

2006-01-03 Thread M
It seems the upgrade was from Mysql 4.0. PASSWORD() function changed between 4.0 and 4.1, it uses longer hashes now. You can still use OLD_PASSWORD() function instead. William Stokes wrote: Hello, My ISP updated their MySQL DB to 5.0.18 and that killed my login procedure which was OK yesterd

[PHP] MySQL update killed my login...

2006-01-03 Thread William Stokes
Hello, My ISP updated their MySQL DB to 5.0.18 and that killed my login procedure which was OK yesterday. Any ideas how to start to debug this? The login updates 2 fields in users table row where username and password macthes. This is the code: if (!$query = mysql_query("update tbl_users set

RE: [PHP] MySQL update

2004-02-24 Thread Howard Miller
I am prepared to be wrong (but I'm too lazy to go and try it)... does MySql return a detailed enough error message to detect *which* field caused the problem. IIRC, I don't think it does. Anyway *if* it does it will be in here... http://www.mysql.com/doc/en/Error-returns.html DUP UNIQUE I guess

RE: [PHP] MySQL update

2004-02-24 Thread Jay Blanchard
[snip] How can I improve on the above to give specific error information. [/snip] Use mysql_error() http://www.php.net/mysql_error -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] MySQL update

2004-02-24 Thread Matthew Oatham
Hi, I have an update statement that tries to update a number of values - these values have unique value constraint so when I do the update it will either succeed or fail. If it fails how can I determine where the update failed. i.e. pinpoint the value that was not unique? At the moment I am do

RE: [PHP] mysql update query

2003-12-19 Thread Jonathan Wilkes
off (only 10 minutes to go), so I wasn't really thinking when I typed it. Honestly, a unique index may be the best bet... -Original Message- From: Enda [mailto:[EMAIL PROTECTED] Sent: 19 December 2003 17:13 To: Php-General Subject: Re: [PHP] mysql update query I used single.

Re: [PHP] mysql update query

2003-12-19 Thread Enda
bit! unless of course someone can come in with a last minute flash of inspiration! i really really don't need this at 5:12 on a friday afternoon! -Original Message- From: Jonathan Wilkes [mailto:[EMAIL PROTECTED] Sent: 19 December 2003 17:00 To: Enda Subject: RE: [PHP] mysql upd

RE: [PHP] mysql update query

2003-12-19 Thread Enda
Jonathan Wilkes [mailto:[EMAIL PROTECTED] Sent: 19 December 2003 16:39 To: Enda; Php-General Subject: RE: [PHP] mysql update query Hi Enda, Does your table have an index per record ? If so, your WHERE clause could just use the index and thus be far simpler, if "A_Number" is an indexed fiel

Re: [PHP] mysql update query

2003-12-19 Thread Richard Davey
Hello Enda, Friday, December 19, 2003, 4:32:44 PM, you wrote: E> which returns the following SQL query: E> UPDATE cdr200311 SET Price=0.225 WHERE (A_Number = 61210146 AND E> StartDateTime = 2003110216502400 AND Duration=15.0167 AND SMSDestinationName E> = '1010') E> The query executes successful

RE: [PHP] mysql update query

2003-12-19 Thread Jonathan Wilkes
ERE Darka www.xfcpro.com -Original Message- From: Enda [mailto:[EMAIL PROTECTED] Sent: 19 December 2003 16:33 To: Php-General Subject: [PHP] mysql update query Hi guys Bit of a problem I'm having here with an update query on a PHP/MySQL site: This is the db query I execute: $resu

[PHP] mysql update query

2003-12-19 Thread Enda
Hi guys Bit of a problem I'm having here with an update query on a PHP/MySQL site: This is the db query I execute: $result6=mysql_query("UPDATE $WorkTable SET Price=$CallCost WHERE (A_Number = $A_Number AND StartDateTime = $D_Full AND Duration=$Duration AND SMSDestinationName = '$SMSDestinationNa

Re: [PHP] mysql update not working

2003-06-25 Thread Chris Sherwood
hmmm can you check to see if your field is exactly named desc in the table... also whether or not it can accept string ie char or varchar. - Original Message - From: "Steven Efurd" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, June 25, 2003 2:03 P

[PHP] mysql update not working

2003-06-25 Thread Steven Efurd
I have the following code: $sql = "UPDATE class_sub SET desc = '$catdesc', sub_cat = '$subcatname' WHERE id='$catid'"; echo $sql; $sql_result = mysql_query($sql); if (!$sql_result) { echo "Couldn't update record!"; echo mysql_error(); exit; } else { header("Location: ind

Re: [PHP] Mysql update problems

2003-01-05 Thread Rick Emery
;jesse" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, January 05, 2003 11:50 AM Subject: Re: [PHP] Mysql update problems No, the query is working fine... all variables are printing correctly. This is what has me confused. Everything seems to be as it should, it's ju

Re: [PHP] Mysql update problems

2003-01-05 Thread jesse
AIL PROTECTED]> Sent: Sunday, January 05, 2003 10:27 AM Subject: [PHP] Mysql update problems I've been scratching my head over the following code for a while now. It's supposed to check a given weblog for specific tags, and if they're present, update the weblog's table in my d

Re: [PHP] Mysql update problems

2003-01-05 Thread Jason Wong
On Monday 06 January 2003 00:27, Jesse Lawrence wrote: > I've been scratching my head over the following code > for a while now. It's supposed to check a given > weblog for specific tags, and if they're present, > update the weblog's table in my database. I believe > the problem is around the exe

Re: [PHP] Mysql update problems

2003-01-05 Thread Rick Emery
Original Message - From: "Jesse Lawrence" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, January 05, 2003 10:27 AM Subject: [PHP] Mysql update problems I've been scratching my head over the following code for a while now. It's supposed to check

[PHP] Mysql update problems

2003-01-05 Thread Jesse Lawrence
I've been scratching my head over the following code for a while now. It's supposed to check a given weblog for specific tags, and if they're present, update the weblog's table in my database. I believe the problem is around the execution of the db query, but I can't seem to get it figured out.

Re: [PHP] MySQL - UPDATE & INSERT

2002-04-05 Thread Erik Price
On Friday, April 5, 2002, at 01:58 PM, Phil Schwarzmann wrote: > Is this query legal? > > $query = "UPDATE table SET (var1, var2, var3) VALUES ($var1, $var2, > $var3) WHERE username='$username'"; No. The SET modifier (or whatever that is) can only be used to create column name/value rela

RE: [PHP] MySQL - UPDATE & INSERT

2002-04-05 Thread Rick Emery
what happened when you tried your query? -Original Message- From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 12:58 PM To: [EMAIL PROTECTED] Subject: [PHP] MySQL - UPDATE & INSERT Is this query legal? $query = "UPDATE table SET (var1, v

Re: [PHP] MySQL - UPDATE & INSERT

2002-04-05 Thread Julie Meloni
The UPDATE syntax in the manual: http://www.mysql.com/doc/U/P/UPDATE.html UPDATE [LOW_PRIORITY] [IGNORE] tbl_name SET col_name1=expr1, [col_name2=expr2, ...] [WHERE where_definition] [LIMIT #] Yes, it is different than the INSERT syntax. PS> ...but only there are like 150 diffe

[PHP] MySQL - UPDATE & INSERT

2002-04-05 Thread Phil Schwarzmann
Is this query legal? $query = "UPDATE table SET (var1, var2, var3) VALUES ($var1, $var2, $var3) WHERE username='$username'"; Im wondering cause I have an INSERT query $query = "INSERT INTO table (var1, var2, var3) VALUES ($var1, $var2, $var)"; ...but only there are like 150 diffe

Re: [PHP] mysql update help needed

2002-03-20 Thread Miguel Cruz
On Wed, 20 Mar 2002, ROBERT MCPEAK wrote: > $sql = "UPDATE mytable SET > img_url=$img_url,visitdate=$visitdate,img_group=$img_group,display=$display, > caption=$caption where id = $id"; You need to surround non-numeric values with 'single quotes'. $sql = "update mytable s

RE: [PHP] mysql update help needed

2002-03-20 Thread Rick Emery
if ($postaction=="edit") -Original Message- From: ROBERT MCPEAK [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 11:44 AM To: [EMAIL PROTECTED] Subject: [PHP] mysql update help needed Can somebody straighten this out for me? I can't get the update to work

[PHP] mysql update help needed

2002-03-20 Thread ROBERT MCPEAK
Can somebody straighten this out for me? I can't get the update to work. I'm sure the variables are being passed to the code. Thanks! if ($postaction==edit) { echo "it fired"; // process form $db = mysql_connect("myhost, "myunam

RE: [PHP] mysql update query

2001-12-04 Thread Lawrence . Sheed
TECTED]] Sent: December 5, 2001 11:37 AM To: 'Tyler Longren'; Greg Sidelinger; [EMAIL PROTECTED] Subject: RE: [PHP] mysql update query are any of the fields of type number/integer/etc? if so, try removing the quotes for that field. -Original Message- From: Tyler Longren [mail

Re: [PHP] mysql update query

2001-12-04 Thread Richard S. Crawford
id='$id'"); > >Although I doubt MySQL cares if certain words are capitalized. > >Good luck though, >Tyler Longren > >----- Original Message - >From: "Greg Sidelinger" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Tuesday, Decembe

RE: [PHP] mysql update query

2001-12-04 Thread Martin Towell
are any of the fields of type number/integer/etc? if so, try removing the quotes for that field. -Original Message- From: Tyler Longren [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 05, 2001 2:36 PM To: Greg Sidelinger; [EMAIL PROTECTED] Subject: Re: [PHP] mysql update query

Re: [PHP] mysql update query

2001-12-04 Thread David Robley
On Wed, 5 Dec 2001 13:57, Greg Sidelinger wrote: > I'm having trouble getting an update query to work > > Here is what I'm doing > > $result = mysql_query("update table set value1='$value1', > value2='$value2' where id='$id'"); > > It is not updating the database. All the $vars have values and I

Re: [PHP] mysql update query

2001-12-04 Thread Tyler Longren
ge - From: "Greg Sidelinger" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, December 04, 2001 9:27 PM Subject: [PHP] mysql update query > I'm having trouble getting an update query to work > > Here is what I'm doing > > $result = mysql_query

[PHP] mysql update query

2001-12-04 Thread Greg Sidelinger
I'm having trouble getting an update query to work Here is what I'm doing $result = mysql_query("update table set value1='$value1', value2='$value2' where id='$id'"); It is not updating the database. All the $vars have values and I'm using the correct columns names. Could someone please po

Re: [PHP] mysql: UPDATE statment

2001-05-11 Thread Christian Dechery
At 21:40 10/5/2001 -0400, [EMAIL PROTECTED] wrote: >why isnt this working > >i need to get 5 values updated in a table called 'user_polls' > >how do I do this? >i have > >UPDATE user_polls WHERE id = '$id' VALUES($1, $2. and so on your statement is incorrect... the correct UPDATE syntax is:

Re: [PHP] mysql: UPDATE statment

2001-05-10 Thread Mark Charette
; statement. Mark C. - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 10, 2001 9:40 PM Subject: [PHP] mysql: UPDATE statment > why isnt this working > > i need to get 5 values updated in a table called 'user_polls' &

RE: [PHP] mysql: UPDATE statment

2001-05-10 Thread Peter Houchin - SunRentals Australia
= Telephone : (03) 9329 1455 Facsimile : (03) 9329 6755 * We rent the dot in .COM! ** -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, May 11, 2001 11:40 AM To: [EMAIL PROTECTED] Subject: [PHP] mysql: UPDA

[PHP] mysql: UPDATE statment

2001-05-10 Thread PeterOblivion
why isnt this working i need to get 5 values updated in a table called 'user_polls' how do I do this? i have UPDATE user_polls WHERE id = '$id' VALUES($1, $2. and so on im getting a SQL error anyone? - Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EM