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
Query a Array Field in MySQL [message #179714] Mon, 26 November 2012 17:04 Go to previous message
heitorfaria is currently offline  heitorfaria
Messages: 3
Registered: November 2012
Karma:
Junior Member
Hello folks,

I have the following function:
#====================================================================
#=======================================
# @ Build Search Drop
# Builds a search field drop-down list.
#=======================================

function build_search_drop($select='')
{


$fields = array( 'id' => 'Ticket ID', 'subject' => 'Subject', 'message' => 'Message', 'mname' => 'Submitted By', 'email' => 'Email' );


$ift_html = "<select name='field' id='field'>";

foreach( $fields as $id => $name )
{
if ( $select == $id )
{
$ift_html .= "<option value='{$id}' selected='yes'>{$name}</option>";
}
else
{
$ift_html .= "<option value='{$id}'>{$name}</option>";
}
}

$ift_html .= "</select>";

return $ift_html;
}

}

?>
#====================================================================

What in need: in $fields=array(...), I want to be able to query another (more complex) database field witch contains a MySql Array (I guess). It has this kind of information:
#====================================================================
a:4:{s:10:"rincidente";s:2:"ri";s:13:"codigoservico";s:5:"00000";s:3: "url";b:0;s:8:"localcpd";s:3:"bsa";}
#====================================================================

So I want to add a query that can return the value of "rincidente" or "codigoservico", for exemple. Is that possible? How I do that?

Regards,

Heitor Faria
[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: Thu Nov 28 08:36:51 GMT 2024

Total time taken to generate the page: 0.04569 seconds