close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Search by ProductID

Thread began 5/17/2012 12:44 pm by mick106153 | Last modified 5/22/2012 11:17 am by Jason Byrnes | 1003 views | 3 replies |

mick106153

Search by ProductID

Using phpMyAdmin I can search MySQL in the ProductID field for a single product but can't figure out how to search for a range of ID's.
i.e. 501, 502, 303 etc.
I've tried various separators and operators to no avail.
How do I search for a string of disparate ID's

Mick

Sign in to reply to this post

Jason ByrnesWebAssist

use either an OR separator, or the IN clause:

OR example:
SELECT * FROM products WHERE ProductID = 501 OR ProductID= 502 OR ProductID = 303


IN Example:
SELECT * FROM products WHERE ProductID IN (501, 502, 303)

Sign in to reply to this post

mick106153

Thanks Jason

That works but how do I limit it to return only i.e. ProductName, ProductSKU etc within the chosen records?

Mick

Sign in to reply to this post

Jason ByrnesWebAssist

in the select statement "*" means all columns.

to limit the columns that are returned, type the name of each column in the Select statement:

SELECT column1, column2, column3 FROM table


see the w3schools site for more details:
sql/

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...