HOW TO INSERT DATA INTO DATABASE THROUGH ARRAY
$ex=mysql_query(“insert into bus_dept(bus_ser_no,bus_time,sync_last_update)
values(’”.$arr[$c][‘bus_ser_no’]."’,concat(‘2013-12-01’,$arr[$c][‘bus_time’]),now())");
ABOVE PROGRAM IS GIVING ERROR.
HOW TO INSERT DATA INTO DATABASE THROUGH ARRAY
$ex=mysql_query(“insert into bus_dept(bus_ser_no,bus_time,sync_last_update)
values(’”.$arr[$c][‘bus_ser_no’]."’,concat(‘2013-12-01’,$arr[$c][‘bus_time’]),now())");
ABOVE PROGRAM IS GIVING ERROR.
You are using deprecated code. Update to PDO and we will be happy to help you. I have provided a complete working PDO database “application” to get you started with PDO in a matter of seconds. I will be more than happy to assist once you do.
http://www.phphelp.com/forum/the-occasional-tutorial/beginners-pdo-bumpstart-code-use-it-now!
*Tip - When you post that something is giving you an error, it would help us to help you if you said what the error is.
*Tip - When having an issue with the database, you will get faster and better answers if you can post the SQL dump of your tables with a few rows of sample data. Also, posting all the code is better than a small snippet. Even if we can fix the issue with a snippet alone we can point out other issues with your code.