$link) $result = mysqli_query($mysqli, "select id, username from users"); // uses the $mysqli object, obtained from mysqli_connect if (!
$result) while ($row = mysqli_fetch_assoc($result)) Persistent connections In the old mysql extension, persistent connections are activated by using mysql_pconnect instead of mysql_connection.
It can be used to convert automatically all the old mysql code to the new mysqli code and it does a pretty good job.
.pass_color_to_child_links a.u-inline.u-margin-left--xs.u-margin-right--sm.u-padding-left--xs.u-padding-right--xs.u-relative.u-absolute.u-absolute--center.u-width--100.u-flex-inline.u-flex-align-self--center.u-flex-justify--between.u-serif-font-main--regular.js-wf-loaded .u-serif-font-main--regular.amp-page .u-serif-font-main--regular.u-border-radius--ellipse.u-hover-bg--black-transparent.web_page .u-hover-bg--black-transparent:hover.
btw, why did you make up ficticious table names and then add the explanation?
you really ought to help make it easier for poeple to try to help you.
The error/warning in PHP 5.5-5.6 will look like this: $link = mysql_connect('localhost', 'my_user', 'my_password'); if (!
$link) $db_selected = mysql_select_db('my_db', $link); if (!
Here is my example..normal update command would be: // question ID ranges from 1-20 // $questionid == 1, $member_id==1 UPDATE table_Foo Bar SET answer One='$ans1Val', answer Two='$ans2Val', answer Three='$ans3Val' WHERE member_id='$memberid' AND question_id='$questionid'; // $questionid == 2, $member_id==1 UPDATE table_Foo Bar SET answer One='$ans1Val', answer Two='$ans2Val', answer Three='$ans3Val' WHERE member_id='$memberid' AND question_id='$questionid'; ..
UPDATE table_Foo Bar SET answer One='yes', answer Two='no', answer Three='yes' WHERE member_id = 1 AND question_id = 1; UPDATE table_Foo Bar SET answer One='no', answer Two='no', answer Three='yes' WHERE member_id = 1 AND question_id = 2; UPDATE table_Foo Bar SET answer One='yes', answer Two='yes', answer Three='no' WHERE member_id = 1 AND question_id = 3; oh, absolutely!!
Historically the mysql extension was the only way until PHP 5.0 (circa 2004).
After that mysqli appeared, which is an improved version of the older mysql driver.
your problem likely lies in the php code, something about constructing variables and looping (i'm guessing -- i don't do php so i only gave your code a cursory glance) however, since you asked this question in the mysql forum, let me give you a mysql answer redesign your table, normalize it to first normal form you have repeating columns in answer One, answer Two, answer Three these should be three rows in a normalized table from there, the php will be slightly different Hello r937! To address your normalization suggestion, here is my table structure (it goes into a tiny bit more detail; my first example was a very generalized one, this one is also generalized to a certain extent) - and there is a specific reason why I have designed it so...which I will explain in a bit.