Crisp Posted April 18, 2007 Share Posted April 18, 2007 Hey ive wrote a very simple News Script, but the only way i can add news to it is iva PHPmyadmin. I have no idea how to write the code to insert the information into a database. Can you help me? Link to comment https://forums.phpfreaks.com/topic/47572-database-insert-help/ Share on other sites More sharing options...
soycharliente Posted April 18, 2007 Share Posted April 18, 2007 For one row... INSERT INTO db_table VALUES ('value_1', 'value_2', 'value_3', ..., 'value_n') For multiple... INSERT INTO db_table VALUES ('value_1', 'value_2', 'value_3', ..., 'value_n'), ('value_1', 'value_2', 'value_3', ..., 'value_n'), ('value_1', 'value_2', 'value_3', ..., 'value_n'), ('value_1', 'value_2', 'value_3', ..., 'value_n'), ('value_1', 'value_2', 'value_3', ..., 'value_n') Link to comment https://forums.phpfreaks.com/topic/47572-database-insert-help/#findComment-232235 Share on other sites More sharing options...
Crisp Posted April 18, 2007 Author Share Posted April 18, 2007 No i meant like a PHP file, that i can use to add the news to my site with. Without having to use PHPmyadmin. Link to comment https://forums.phpfreaks.com/topic/47572-database-insert-help/#findComment-232236 Share on other sites More sharing options...
soycharliente Posted April 18, 2007 Share Posted April 18, 2007 Why would you want to do that? I'm having trouble understanding. Link to comment https://forums.phpfreaks.com/topic/47572-database-insert-help/#findComment-232315 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.