Page is a not externally linkable
stephen675 - 11:48 pm on Dec 29, 2008 (gmt 0)
Now the next question - is there a way to submit multiple updates in one query. Currently, I'm planning to do something like the following: mysql_query("INSERT tbl_survey SET q1_answer_1=1, userid='$userid', item='$item' WHERE area='$q1_answer_1'); mysql_query("UPDATE tbl_survey SET q1_answer_2=1 WHERE userid='$userid' AND item='$item' AND area='$q1_answer_2'); mysql_query("UPDATE tbl_survey SET q1_answer_3=1 WHERE userid='$userid' AND item='$item' AND area='$q1_answer_3'); ... As you can see, the first query inserts the info and the following queries update the first insert. Obviously this can become quite cumbersome with 45 answers... Is there a simpler way of setting these into an array and executing one insert row all at once WHERE item='$item_nbr' and userid='$userid' ? Any help is appreciated. Thanks, Stephen
Ok, found my answer. Thanks again for the suggestion.