- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘Back End’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hi all,
Could you tell me How to insert multiple rows in one table ?
Thanx in advance ☺
Use it like this:
ylex
Thanx ylex1
Sorry ☺
i meant Insert multiple rows in DataBase table
Like
we assume we created table called info
$Query = INSERT INTO info (name, age) VALUES ('$name', '$age');
$SQL = mysql_query($Query);
This query will insert on row in the SQL table
then insert new data in the form and insert again that’s take long time
i don’t know the idea to insert multiple row in one time
I tried this and work with me
include"config.php";
/*
CREATE TABLE `multiple` (`m_id`,`m_name`,`m_email`);
*/
if($_REQUEST){
$name = $_POST;
$email = $_POST;
$name1 = $_POST;
$email1 = $_POST;
$name2 = $_POST;
$email2 = $_POST;
$SQL = "INSERT INTO multiple ";
$SQL .= "(`m_name`, `m_email`) ";
$SQL .= "VALUES ";
$SQL .= "('$name','$email'), ";
$SQL .= "('$name1','$email1'), ";
$SQL .= "('$name2','$email2')";
$Query = mysql_query($SQL) or die(mysql_error());
if($Query){
echo"MULTIPLE INSERT IS DONE !
";
}
}
?>
but in need it more dynamically
like in array when i make form through this form can add more records by JQuery such
and dynamically add the values of this records in the mysql table ??