At 11:12 AM 8/3/2006, Nicholas Vettese wrote:

I am working on a script that looks at the MySQL Table, checks to see if there are any matches, and if there are, alter the table to add the requested information. Here is the code I am using:

<script>
$query = "ALTER profile (acct_type, username, firstname, lastname, email, addr1, city, state, zip, nude, artistic, model_look, about_you, why_model, genre) VALUES ('$at', '$un', '$fn', '$ln', '$e', '$ad1', '$c', '$st', '$zc', '$nd', '$art', '$ml', '$ay', '$wm', '$g')";
</script>

What am I doing wrong? The error comes back saying that this is where the problem is, and I have changed it from UPDATE to ALTER because I was trying to get the information to be added to the table of an already registered user.

Nick

Nick,

Just to add to what Peter said, and so you do not inadvertently shoot yourself in the foot, have a look at some tutorials, like this one:
        http://www.php-mysql-tutorial.com/
which appears to be divided into sections appropriate to operations on the database.

Then check the MySQL docs for specifics on SELECT, INSERT and UPDATE.

Fortunately your ALTER TABLE statement was incorrect, otherwise you would have destroyed the table and lost all of your data.

Regards - Miles Thompson

--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.394 / Virus Database: 268.10.5/406 - Release Date: 8/2/2006



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to