Jump to content

Array/subArray mysql insert


Recommended Posts



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 :)




Link to comment
Share on other sites

This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.