Jump to content

Array/subArray mysql insert


thales.pereira

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.