Multiple arrays inside data


Posted on 16th Feb 2014 07:03 pm by admin

Hi,

Simple question. I have a column called "array" in my database, and inserted into each field is the following imploded array:
Code: mctriangle,570.65,355.1,1,1,0
Did you know?Explore Trending and Topic pages for more stories like this.

It is an instance of an object. Each field in each row contains this information as an imploded array.

[0] = Name
[1] = X Axis
[2] = Y Axis
[3] = ScaleX
[4] = ScaleY
[5] = Rotation

When extracted from the database, it is exploded back into the array above.

As you can see, I would need to store a lot of rows for each object. Say we use 200 objects, thats 200 rows, which would be hard to search through.

My question is: Could I store multiple imploded arrays inside 1 row only. E.g:

mctriangle,570.65,355.1,1,1,0&&mctriangle,570.65,355.1,1,1,0&&mctriangle,570.65,355.1,1,1,0&&mctriangle,570.65,355.1,1,1,0&&mctriangle,570.65,355.1,1,1,0

The above would be 5 objects in one row of data, each imploded array separated by &&. How would I go about doing such a thing?

Thanks!
No comments posted yet

Your Answer:

Login to answer
291 Like 19 Dislike
Previous forums Next forums
Other forums

Collecting AOL Search Terms
I am attempting to collect AOL search terms. I know the code is correct (it works for google, bing,

C++ API to Oracle dB
I need to perform a select command to the Oracle dB to obtain information from a table.
What libr

Image resize
Hi again fellers

I managed to sort out the issues with the folder,

Final hurdle is th

Help with looping
I have a comma separated list of colors taken from a database ($ICo) and a directory of images named

Variable passed to each() is not an array or object
Hi,

This is a email a friend type of form, and it isn't working anymore.

<?

extract content from a website
i have written a code that will grab the content from the index page..
i would like to know how c

How to form a xml form table with a single sql statement..?
Hi everyone,
I don't know if this is going to be a duplicate thread but i couldn't

Basic Forum Tutorial
Hi, I'm new to PHP. I want to build a basic forum for my site using PHP and MySQL. I've searched t

PHP template help
Ok, I don't know if anyone can help me but I am using PHP templates to make a site. I am a newbie an

Script not running properly
Hello Everyone
This is a basic script for posting to a database. I'm not sure why it doesn't work

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash