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

sql problems
I am having a small problem with my sql statement. it is inserting into 4 of the fields.

fie

Why does my php page download images over and over
Can anybody please explain to me why my php page keeps downloading the images and other items every

Javascript form submit and radio buttons?
When this form is submitted, it is automatically resubmitted using JS.

All my fields are carr

Adding Outlook 2007 items via file upload
I am looking for a way to be able to attach an Outlook item (an email message) in an ASP.NET 3.5 app

Problem with php's rename function
So, i'm having a problem with the php rename function. Basically my script 'delete_user.php' attempt

value not going in data base
hello friends....
i am having a working javascript....when i am selecting any

Problem with PHP code- simple contact form
I'm relativily new to PHP; I know HTML and CSS stuff but I have a problem- I have a contact form wit

Allowing ' and "
Hello everyone,

I am creating a form where users submit information to go into a database. I

User feedback after MySQL query has been executed
Hi all, I've just registered on PHPFreaks because I've got a question that I simply can't work out b

PHP SUBMIT
Code: <input name="doLogin" type="image" src="images/loginsubmit.jpg

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