Jump to content

Best Way To Search?


Winter0Star

Recommended Posts

Going to make a site here soon and I need a little help.

 

I will be storing an array of ID's into a MySQL database.  I'm using the serialize function to store the array (however, I can change this if there is a better way).  However, I want to be able to search for ID's directly through the MySQL statement.

 

For example, I need to search for ID "254".  I can't search through the serialized information unless I pull it out first.  I want to be able to do something like this...

 

SELECT name FROM table WHERE id_list = '$id'

 

I'm looking for the best way to directly search for an ID.  I hope this makes sense.

Link to comment
https://forums.phpfreaks.com/topic/239250-best-way-to-search/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.