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

foreach and array need help combining
Hi guys.

Here's the code

Code: array(
'tag' => 'code',<

Query output more than expected
$query=mysql_query("SELECT * FROM players, communities, divisions WHERE dob BETWEEN '{$start_da

Google Wave
So... has anyone used it yet? Is it any good?

http://wave.google.com/help/wave/about.html#vid

Php mysql - select?
Hi i have this code:
Code: $iteminfo = mysql_query("SELECT desc FROM wc_items WHERE itemid =

Help With editting and deleting form
Hallo !!

So look at this image :

http://img194.imageshack.us/img194/8272/snapshot5f.pn

mysql_real_escape_string making variable equal nothing
i post a form and i post the variable:
Code: $var = $_POST[variable];then i echo $var its what i

Navigation include for all site directories
Hi,

I need a navigation include that can deal with directories at different levels on a site.

Dump with added_funcion cl_salv_table
Hi there, I'm having some troubles adding a self defined function to an ALV in fullscreen. The thing

checkbox update
I am having a brain fart right now and i cant remember how to do this. if anyone could help that wou

default SAP userid
hi,, I just like to know if it is ok to use the default SAP user id (SAP*)?

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