note 92671 deleted from function.mysql-field-flags by danbrown

From: Date: Mon, 03 Aug 2009 16:46:17 +0000
Subject: note 92671 deleted from function.mysql-field-flags by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-159037@lists.php.net to get a copy of this message
Note Submitter: play at arcadevillage dot com ( Marlon ) ---- Sorry my previous code did not work. Mistery of the copy past. Here is the good code $nbc = mysql_num_fields($req_table); while ($ligne = mysql_fetch_array($req_table)) { $insertions = "INSERT INTO $table VALUES("; for ($i=0; $i<$nbc; $i++) { if ( $i > 0 ) $insertions .= ", "; if ( !isset($ligne[$i])) $insertions .= "NULL"; else $insertions .= "'" . mysql_real_escape_string($ligne[$i]). "'"; } $insertions .= ");"; $dumpsql[] = $insertions; } $dumpslq is the variable where I put the insertion orders before writting them in a text file.

« previous php.notes (#159037) next »