note 92671 added to function.mysql-field-flags
| From: | (Marlon) | Date: | Mon, 03 Aug 2009 14:18:47 +0000 |
| Subject: | note 92671 added to function.mysql-field-flags | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-159031@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 69.147.83.197
Probable Submitter: 193.48.245.123
----
Manual Page -- http://www.php.net/manual/en/function.mysql-field-flags.php
Edit -- https://master.php.net/note/edit/92671
Del: integrated -- https://master.php.net/note/delete/92671/integrated
Del: useless -- https://master.php.net/note/delete/92671/useless
Del: bad code -- https://master.php.net/note/delete/92671/bad+code
Del: spam -- https://master.php.net/note/delete/92671/spam
Del: non-english -- https://master.php.net/note/delete/92671/non-english
Del: in docs -- https://master.php.net/note/delete/92671/in+docs
Del: other reasons-- https://master.php.net/note/delete/92671
Reject -- https://master.php.net/note/reject/92671
Search -- https://master.php.net/manage/user-notes.php