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

Calling variables
I want to call this to my website but it doesn't display what I want it to,

Code: <h5&

Please help - should be a simple fix.. driving me nuts
Everything seemed to be working fine. I have a table, it alphabetically lists a bunch of cities and

post to self
Trying to get my form to submit to itself. However I am also trying to use an image for my submit bu

Why Are These Functions Causing MASSIVE Memory Problems? Please Help!
Hi,

I have a script with some options.

I use regex to replace patterns in strings, but

Problem with a select distinct
I have a problema with a select distinct, I have the next sql:

select distinct a,b,c,d fr

Expandable Post Code
Hi,

Hope you can help. Which currently I haven't upgraded to connect to a mysql server, so i

Good Programming and Web Design Books
Hi,

I recived a pm today from a fellow phpfreaker regarding php books, i replied with the fo

xApp Analytics in BI 7.0
Dear all,

I am trying to implement xApp Analytics in BI 7.0. After I installed the analyt

Kill a process
I have a question - how can I kill a process from a command line or by using Oracle SQL Developer? I

Why does my crawler script suddenly end with no error?
Hi.

I have written a web crawler script. It will visit a large number of URL's with cURL.

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