FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Query a Array Field in MySQL
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Query a Array Field in MySQL [message #179723 is a reply to message #179720] Wed, 28 November 2012 05:10 Go to previous messageGo to previous message
Scott Johnson is currently offline  Scott Johnson
Messages: 196
Registered: January 2012
Karma:
Senior Member
On 11/27/2012 6:56 AM, heitorfaria(at)gmail(dot)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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Analista Programador PHP SENIOR
Next Topic: Manually create array that matches mysql_fetch_array
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 00:12:27 GMT 2024

Total time taken to generate the page: 0.04089 seconds