bidntrade wrote:please remember ... im not that skillfull
Yes, I remember - that's what we are trying to "fix"
OK, that;s what
pytrin wrote:
Code: Select all
$values = array();
foreach( $data as $row ) {
$values[] = "(" . $row['user_id'] . "," . $row['content'] . ")";
}
if( !empty($values) ) {
$query = "INSERT INTO `test_table` (user_id,content) VALUES "
. implode(',',$values);
mysql_query($query);
}
Your problem is taht part:
Code: Select all
foreach( $data as $row ) {
$values[] = "(" . $row['user_id'] . "," . $row['content'] . ")";
}
Obviously, foreach(...) should be replaced with your while(....)
The rest of the code ... try it yourself
