Hello everyone, I have a function that adds several rows to the database by taking values from the array
function createQuery($id, $a, $b){ $query = "INSERT INTO opisanie (x,text,text_opis) VALUES "; $limit = count($a); for($i=0; $i<$limit; $i++){ $query .= "('{$id}','{$a[$i]}', '{$b[$i]}')".($i!=$limit-1?',':''); } $res = mysql_query($query); } $aText = $_POST['form_text_o']; $aOpis = $_POST['form_text_opis']; $query = createQuery($id, $aText, $aOpis); How to me the same principle to update lines in a DB? Tell me please..
mysql- poke it with a stick and rewrite it everywhere onmysqli- Gedweb