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

Multi-user card game
I'm writing a batch of games and such. Lottery is finished, Poker,blackjack,etc are next. They will

PHP url branch??
Functionally, using PHP, I'm doing a test of login input submitted by a user via an html form in a f

upgrade from 4.7 to ECC 6.0
Hi all,
we are going to do an upgrade from R/3 4.7 to ECC 6.0. I need to know if i can find som

How to update this array?
I am saving a string that looks this: username1, username2, username3...
into a single cell in a

Please help with SMTP Authenticated PHP Email Form
Hello, I'm creating a PHP email form, and for this particular server, I have to use SMTP Authenticat

COde for a Cc
I'm not receiving $ft as a Cc. Why is that??

$to = "$email";
$headers = "Fr

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

All my fields are carr

Vertical Alligning - Not working in 1 cell?
<?php

echo "<table id="valign" width="60%" style=

Using system() and bringing back the results
I am aware that you can use system() within PHP to execute system commands, but I was wondering if t

Different payment methods with different cross company requirements in F110
We are implementing SAP in a company in the shipping industry. They have the following requirement:<

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