Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #7654

Re: Query a Array Field in MySQL

From Scott Johnson <noonehome@chalupasworld.com>
Newsgroups comp.lang.php
Subject Re: Query a Array Field in MySQL
Date 2012-11-27 21:10 -0800
Organization A noiseless patient Spider
Message-ID <k946c3$esf$1@dont-email.me> (permalink)
References <54d3cfad-b3c7-4ae2-b375-8897168810df@googlegroups.com> <k90hpr$1h2$1@dont-email.me> <6e18affc-288d-4d0e-ae77-a61334f0d7a8@googlegroups.com>

Show all headers | View raw


On 11/27/2012 6:56 AM, heitorfaria@gmail.com wrote:
>> Array
>>
>> (
>>
>>       [rincidente] => ri
>>
>>       [codigoservico] => 00000
>>
>>       [url] =>
>>
>>       [localcpd] => bsa
>>
>> )
>
> Scott,
>
> Another dummie question (sorry, Im new at this).
> Is there a way to do it like im planning? What am I doing wrong? =>
>
> $cdfields = unserialize('cdfields');
> $fields = array( $cdfiels[1] => 'bsa, spo, rjo?', $cdfiels[2] => 'bsa, spo, rjo?', ... );
>

Well that all depends.  There are several unanswered questions here.

First off the data you are plugging into the unserialize() function is 
not a variable but a string.

But don't fret.

In order to help we need to know how you are getting the data out of the 
Database and what the data looks like outside that DB. (From your 
previous post that is what I remember you are doing)

Once this is known we can move forward.

If you are unsure what I am talking about, then go to the 
comp.databases.mysql.  Most people (including myself) also visit over 
there and will be able to help you out getting what you need out of the DB.

GL.
Scotty

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Query a Array Field in MySQL heitorfaria@gmail.com - 2012-11-26 09:04 -0800
  Re: Query a Array Field in MySQL Scott Johnson <noonehome@chalupasworld.com> - 2012-11-26 12:00 -0800
    Re: Query a Array Field in MySQL heitorfaria@gmail.com - 2012-11-27 06:40 -0800
    Re: Query a Array Field in MySQL heitorfaria@gmail.com - 2012-11-27 06:56 -0800
      Re: Query a Array Field in MySQL Scott Johnson <noonehome@chalupasworld.com> - 2012-11-27 21:10 -0800
  Re: Query a Array Field in MySQL Jerry Stuckle <jstucklex@attglobal.net> - 2012-11-26 15:10 -0500
  Re: Query a Array Field in MySQL Denis McMahon <denismfmcmahon@gmail.com> - 2012-11-27 00:28 +0000
  Re: Query a Array Field in MySQL Denis McMahon <denismfmcmahon@gmail.com> - 2012-11-27 00:28 +0000

csiph-web