[UPHPU] Update/Replace MySQL query

OgdenNights.com lists at ogdennights.com
Mon Nov 22 10:28:24 MST 2004

I'm trying to edit all of the content in a MySQL row except for the 
"id" row which is an auto increment column. I was getting a Syntax 
Error on the Update, so I tried this Replace command instead. It gave 
me the same error. I've poured through the MySQL manual and my 
"Programming PHP" book and according to them, this code should be 
correct. I know it's probably a _very_ simple mistake, but I just 
haven't been able to figure it out.

		$spec_sql = "REPLACE gen_test_questions SET id='$new_id', 
category='$new_category', question='$sl_question', 
answer_1='$sl_answer_1', answer_2='$sl_answer_2', 
answer_3='$sl_answer_3', answer_4='$sl_answer_4', 
corr_answer='$new_corr_answer', explination='$sl_explination', 
points='$new_points', status='$new_status'";
		$spec_result = $db->query($spec_sql);
		if (DB::isError($spec_result)) {

Thank you.

More information about the UPHPU mailing list