|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
How to Insert Multiple Rows At Once in PHP I have tried inserting multiple rows in database with the help of PHP I am using MySQL as my database but it give me an continues error list I have tried restarting my application, as it might kept any thing wrong in its cache but does not work out I have used simple inserting statment such as $sql = "INSERT INTO database (a,b,c,d,e) VALUES ('$a', '$b' ,'$c', '$d','$e')"; I am sure that there is absolutely no problem, but it does not working out. please help. |
#2
| |||
| |||
Re: How to Insert Multiple Rows At Once in PHP If you want to insert multiple rows at once the standard procedure is to first select multiple rows and then use the "Insert" command. When it comes to inserting data the GridView has very little to offer. Using a technique as illustrated in my article titled Inserting a New Row in GridView you can insert a single record using EmptyDataTemplate of the GridView. However, what if you want to insert multiple rows using GridView? |
#3
| |||
| |||
Re: How to Insert Multiple Rows At Once in PHP Try creating a function with a new recordset and call that function only when adding to the database, In real world cases developers often require such a mechanism. Orelse you may insert into t1 values(,,,) insert into t2 values(,,,) insert into t3 values(,,,,)......try this ........ |
#4
| |||
| |||
Re: How to Insert Multiple Rows At Once in PHP By design the GridView control is a data bound control. That means it always requires some data source to bind with. One more thing, does access treat this huge statement as a transaction ie. take it or leave it or does it execute until it encounters an error or until it finishes? It cannot be used in unbound fashion. In order to display empty rows in the GridView you need to have a data source that contains empty items. |
![]() |
|
Tags: insert rows, multiple rows, mysql database, php language |
Thread Tools | Search this Thread |
|
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to auto insert rows in excel | Yakov | Windows Software | 7 | 19-04-2012 05:55 PM |
Help me transposing multiple rows into one column with row labeling in Excel | RYAN$ | MS Office Support | 2 | 17-01-2012 06:31 PM |
Multiple rows for same id on Oracle 10 | KADIN | Software Development | 4 | 23-11-2009 05:20 PM |
Multiple rows of tabs in Firefox | Mr.ken | Technology & Internet | 3 | 25-04-2009 11:49 AM |