RE: [PHP] Array into database

2002-06-12 Thread Lazor, Ed

Depends on the average size of data that you're working with.  You have to
count how many bytes each array take up.  I think the sizeof function will
do this for you.

-Ed

-Original Message-
And how should I store a serialized variable in my database? As String or as
Blob?



 

This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message.  If you have received this message in error, please immediately
advise the sender by reply email and delete the message.  Thank you very
much.   

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Array into database

2002-06-11 Thread Leon Mergen


"Stuart Dallas" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> As far as I know, serialize will handle multi-dimensional arrays. If I
were you
> I would suck it and see.

And how should I store a serialized variable in my database? As String or as
Blob?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Array into database

2002-06-11 Thread Stuart Dallas

On Tuesday, June 11, 2002 at 10:59:00 PM, you wrote:

> So this would handle 2-demensional arrays too?

> So, if I have

> $array = (
> "foo" => "bar",
> "wom" => "bat"
> );

(erm, i know it's late, but that looks like a 1-dimensional associative array)

> it would work?

As far as I know, serialize will handle multi-dimensional arrays. If I were you
I would suck it and see.

-- 
Stuart


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Array into database

2002-06-11 Thread Leon Mergen

So this would handle 2-demensional arrays too?

So, if I have

$array = (
"foo" => "bar",
"wom" => "bat"
);


it would work?

And darn, that I didn't come up with this (I'm familliar with Java, and they
use Serializable) ...

"Stuart Dallas" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Tuesday, June 11, 2002 at 10:25:36 PM, you wrote:
> > I would like to know wether it's possible to put an array into a
database?
> > If not, what is the best way to archieve something like that?
>
> Yes it is. See http://www.php.net/serialize
>
> --
> Stuart
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Array into database

2002-06-11 Thread Stuart Dallas

On Tuesday, June 11, 2002 at 10:25:36 PM, you wrote:
> I would like to know wether it's possible to put an array into a database?
> If not, what is the best way to archieve something like that?

Yes it is. See http://www.php.net/serialize

-- 
Stuart


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php