and regards,
Kevin
-Original Message-
From: Jenaro Centeno Gómez [mailto:[EMAIL PROTECTED]
Sent: 04 March 2006 17:35
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] MySQL update statement problem
Maybe I am wrong, biut isn´this the rigth way to do this:
UPDATE shop_customer SET eu_vat_numb
You need to separate the SET arguments with commas, not ANDs...
It's really doing something like this:
UPDATE shop_customer SET eu_vat_number = ("SK1234567890" AND vat_amount = 0
AND total_amount = 8.4925) WHERE customer_id = 7 AND hash="dcd5e751"
("SK1234567890" AND vat_amount = 0 AND total_amo
Hi,
Apologies if this isn't the right place to ask - but I'm banging my head
against the wall with this one!
I'm trying to update a record in the table (creation script below) using the
following SQL statement:
UPDATE shop_customer SET eu_vat_number = "SK1234567890" AND vat_amount = 0
AND total_
Message-ID: <[EMAIL PROTECTED]>
Date: Sun, 27 Nov 2005 12:49:17 -0500
From: Glenn Deschênes <[EMAIL PROTECTED]>
To: php-db@lists.php.net
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="=_Part_11492_6161784.1133113757293"
Subject: Re: [PHP-DB
uccessful. ".$queryresult." rows were
> altered.";
> }
> echo $msg;
>
> Hope this helps.
>
> Rich
>
> -Original Message-
> From: maestro [mailto:[EMAIL PROTECTED]
> Sent: Friday, November 25, 2005 1:11 PM
> To: php-db@lists.php
ginal Message-
From: maestro [mailto:[EMAIL PROTECTED]
Sent: Friday, November 25, 2005 1:11 PM
To: php-db@lists.php.net
Subject: [PHP-DB] MySQL Update Quandry
Greetings,
I am doing an update to a table as such:
class DB {
function updateMember($email, $password, $postalCode,
Greetings,
I am doing an update to a table as such:
class DB {
function updateMember($email, $password, $postalCode,
$language, $id, $word) {
...
if (!(@ mysql_query($query, $connection))) {
$this->errors = array(mysql_errno(), mysql_error());
$
On Thu, 9 Jun 2005, Ron Piggott wrote:
I created a PHP based mailing list that sends out a Bible verse and a
quotation each day. Today's verses were:
[snip]
Let me show you some code:
It selects a Bible verse:
SELECT * FROM bible ORDER BY RAND() LIMIT 1
On a side note, this is going to
I created a PHP based mailing list that sends out a Bible verse and a
quotation each day. Today's verses were:
Bible verse of the day:
Matthew 17:19-21 Then the disciples came to Jesus privately and said, "Why
could we not cast it out?" And He said to them, "Because of the littleness
of your fa
hi all,
1) Question on UPDATE
My situation is this: I want to update Table1 with values that can be found in
Table2.. in short, I would like to do the following:
$query = "update Table1, Table2 set Table1.field1 = Table2.field2 where Table1.no =
Table2.no";
however
How about:
function do_query ($table, $fields, $where)
{
$sql = 'update ' . $table . ' Set ';
foreach ($fields as $k=>$v)
$sql = $k . ' = \'' . $v . '\',';
return mysql_query ($sql);
}
Not sure if it adapts 100% to your case but you can probably fix it
up..
$query = "UPDATE tablename SET ";
foreach($_POST AS $key => $value)
$query .= "$key = '$value',";
$query[strlen($query)-1] = "";
$query .= " WHERE id = '$_GET[id]';
Or something?
On Tue, 2002-11-12 at 13:58, David Rice wrote:
>
>
> Making an update query that adapts to the number of fie
Making an update query that adapts to the number of fields that are to be
updated
Is there anyway to do like a for loop to create the values part of the query
then combine it with the first part of the string.
something like what i have below... although something that works correctly
as thi
: Thursday, June 27, 2002 11:07 AM
To: '[EMAIL PROTECTED]'
Subject: [PHP-DB] MySQL Update failing...
In need of some help. I have a PHP form page that is updating a
MySQL database that is not working. Here is the code for the three pages
that work together for this applica
I didn't get your attachements. Maybe paste them in a row into the email?
-Original Message-
From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 27, 2002 10:07 AM
To: '[EMAIL PROTECTED]'
Subject: [PHP-DB] MySQL Update failing...
In need o
In need of some help. I have a PHP form page that is updating a
MySQL database that is not working. Here is the code for the three pages
that work together for this application. The oncall_new.php works fine to
insert new records into the database, and the oncall_log.php works fine to
d
Correct your example as follows:
$sql = "UPDATE $table_name SET new_area=\"$new_area\"";
-Original Message-
From: jas [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 26, 2002 10:49 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL Update command syntax
Could any
Could anyone help me out with the update command in php? I am trying to
update a unique field on a table, or overwrite the current contents of said
field. My sql statement is as follows...
$db_name = "localhost";
$table_name = "table01";
$connection = @mysql_connect("localhost", "user", "passwor
Hi Chris,
Can anyone see what is wrong with this query? I am trying to update some fields, if I
do an echo everything
looks good but it doesn't update the fields in the DB - am I missing something obvious
here?
$mysql_query ("UPDATE search6 SET email = '$email',description = '$comments',categ
Hi there,
Can anyone see what is wrong with this query? I am trying to update some fields, if I
do an echo everything looks good but it doesn't update the fields in the DB - am I
missing something obvious here?
Thanks for your help
Chris
www.planetoxygene.com
$mysql_query ("UPDATE search6 S
Check out for MySQL mailing lists
http://www.mysql.com/documentation/lists.html
-JAson Garber
At 03:42 PM 9/20/2001 -0500, Christopher Raymond wrote:
>NOTES: I know this is a PHP list, but I also know that many of you are
>experienced MySQL admins. In addition, I was unable to find a MySQL
>ne
NOTES: I know this is a PHP list, but I also know that many of you are
experienced MySQL admins. In addition, I was unable to find a MySQL
newsgroup, so if you can help me out there, I would appreciated it and would
most certainly post my question there.
QUESTION: My ISP does not enable update
on 8/30/01 4:06 PM, Malcolm White at [EMAIL PROTECTED] wrote:
> $query = "UPDATE Groups SET GName=$new_name WHERE GID=$gid";
If the Gname field is a string type, there should probably be quotes around
it.
$query = 'UPDATE Groups SET GName="' . $new_name . '" WHERE GID=' . $gid;
HTH.
S
I am having a problem with UPDATE queries with MySQL. Insert, Delete, etc
work fine. I have checked the query statement and it works fine directly
with MySQL just not in a PHP script. An example function is;
function update_gname($gid, $new_name){
$query = "UPDATE Groups SET GNa
24 matches
Mail list logo