Jump to content

Array insert into sql


kabar916

Recommended Posts

Before you go ahead and simply store an array in a format that is near useless for searching. What exactly does this array contain and will the data be used for?

 

If you going to need to manipulate it or search for it while it is in a database then serialising it is a bad option. Instead, you should store it as normalised data, maybe even key value pairs.

 

We need more details about what the data actually is for.

Link to comment
Share on other sites

This is what im getting:

a:603:{i:0;s:14:"17-1126-01.jpg";i:1;s:14:"17-1124-01.jpg";i:2;s:14:"17-1118-00.jpg";i:3;s:14:"17-1108-01.jpg";i:4;s:14:"17-1106-01.jpg";i:5;s:14:"17-1104-01.jpg";i:6;s:14:"17-1102-01.jpg";i:7;s:14:"17-1100-01.jpg";i:8;s:14:"17-1096-01.jpg";i:9;s:14:"17-1070-66.jpg";i:10;s:14:"17-0001-01.jpg";i:11;s:14:"15-5021-01.jpg";i:12;s:14:"15-5019-01.jpg";i:13;s:14:"15-5017-01.jpg";i:14;s:14:"12-5257-00.jpg";i:15;s:14:"12-5255-01.jpg";i:16;s:14:"12-5253-00.jpg";i:17;s:14:"12

 

How can i insert this into the database?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

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

Guest
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.