 |
|
|
09-15-2007, 12:46 PM
|
Multiple update queries?
|
Posts: 876
Name: Matt Pealing
Location: England, north west
|
Im guessing you can't do this in PHP/MySQL?
PHP Code:
$sql=mysql_query("UPDATE profile SET (name, heightft, heightin, bust, waist, hip, hair, eye, location, age, shoe, dress, special) VALUES ('$_POST[name]', '$_POST[heightft]', '$_POST[heightin]', '$_POST[bust]', '$_POST[waist]', '$_POST[hip]', '$_POST[hair]', '$_POST[eye]', '$_POST[location]', '$_POST[age]', '$_POST[shoe]', '$_POST[dress]', '$_POST[special]') where name='$_POST[model]'");
Would I need to update each field with its own update query or something?
|
|
|
|
09-15-2007, 09:18 PM
|
Re: Multiple update queries?
|
Posts: 44
Name: Kuldeep Sahi
|
You can have a single update query, but the syntax is this way:
PHP Code:
$sql=mysql_query(" UPDATE profile SET name='$_POST[name]', heightft='$_POST[heightft]', heightin='$_POST[heightin]', bust='$_POST[bust]', waist='$_POST[waist]', hip = '$_POST[hip]', hair='$_POST[hair]', eye='$_POST[eye]', location='$_POST[location]', age='$_POST[age]', shoe='$_POST[shoe]', dress='$_POST[dress]', special'$_POST[special]') where name='$_POST[model]'");
|
|
|
|
09-15-2007, 10:38 PM
|
Re: Multiple update queries?
|
Posts: 730
Name: John
Location: United States of America, California
|
Only if they are the same table that will work
Quote:
Originally Posted by Kuldeep2195
You can have a single update query, but the syntax is this way:
PHP Code:
$sql=mysql_query(" UPDATE profile SET name='$_POST[name]', heightft='$_POST[heightft]', heightin='$_POST[heightin]', bust='$_POST[bust]', waist='$_POST[waist]', hip = '$_POST[hip]', hair='$_POST[hair]', eye='$_POST[eye]', location='$_POST[location]', age='$_POST[age]', shoe='$_POST[shoe]', dress='$_POST[dress]', special'$_POST[special]') where name='$_POST[model]'");
|
|
|
|
|
09-16-2007, 06:54 AM
|
Re: Multiple update queries?
|
Posts: 876
Name: Matt Pealing
Location: England, north west
|
Ahhhh I seeeeeeeee!
Thanks to both, yea the table is the same 
|
|
|
|
|
« Reply to Multiple update queries?
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|