thales.pereira Posted April 5, 2011 Share Posted April 5, 2011 Hi, I have an 2 arrays ( $match[1] and $match[2] ) with 50+ fields that i need to insert into a database, but im not getting how i could do it. Until now im trying with with the following code: $sql="INSERT INTO is_trigger_reference (triggerName) VALUES ('$match[2][0]')"; mysql_query($sql) or die(mysql_error()); But when i check into the db table i only got: triggername ( field name ) Array[0] ( data inserted) I know i can set a var to each array ( 40+ ) but i belive there's something more clean than that Thanks! Link to comment https://forums.phpfreaks.com/topic/232747-arraysubarray-mysql-insert/ Share on other sites More sharing options...
thales.pereira Posted April 5, 2011 Author Share Posted April 5, 2011 solved with: '".$match[2][0]."' Link to comment https://forums.phpfreaks.com/topic/232747-arraysubarray-mysql-insert/#findComment-1197159 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.