How to search multiple values at once in phpMyAdmin

  • cerio
  • Proficient
  • Proficient
  • User avatar
  • Posts: 263
  • Loc: UK

Post 3+ Months Ago

May I ask you a database search question, please? I am useless with databases but I know how to search for one item at a time in my website's; I just put in the item code (e.g. wk660) at the pd_code line in the phpMyAdmin search page, but I don’t know how to search for more than one item in a single search.

I want to search for several items in one search, using more than one item code at a time. I tried... wk660 OR wk30 OR wk483 to search for three at the same time but it didn’t find anything, although all three can be found if I do them one at a time.

I also tried separating them with AND and I tried enclosing the product codes in %%. None worked. My Google searches haven’t helped me find how to do it. Can you tell me what I should put in to search for several items in one search, please?

There is a screenshot below of the phpMyAdmin search page to show what I mean. The line I put the item code into is pd_code, you can see one item code in it in the picture
Attachments:
searchdatabase.jpg


Cerio
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9090
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

From the pulldown menu instead of choosing LIKE, choose REGEXP. Then for the value separate each thing you are searching for with a pipe symbol, which is '|'. So for instance you would put this for the value:

wk660|wk30|wk483

Let me know if that does the trick :)
  • cerio
  • Proficient
  • Proficient
  • User avatar
  • Posts: 263
  • Loc: UK

Post 3+ Months Ago

Yay! It found and displayed all three I put in.
Thank you

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 78 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.