close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


Recordset SQL 2 WHERE Expressions not working

Thread began 9/17/2010 3:44 am by jo4koalas392067 | Last modified 9/17/2010 4:03 am by Dave Buchholz | 473 views | 1 replies |


Recordset SQL 2 WHERE Expressions not working


I have set up an online shop, but I only want to display those items that have not been sold and in a certain category. I can get only the category items to display, but when I add and extra where statement e.g. <> "Sold" the page does not display. I have attached a copy of the page. Can you advise where I am going wrong?

To view a functioning web page this does not have the "Sold" filter in place only category filter.

Many thanks

Attached Files
Sign in to reply to this post

Dave BuchholzBeta Tester

How do you store the sold flag in your database ? Is it text ?

If it is text you need to wrap sold in single quotes like so:

$query_WADAitems = "SELECT ItemID, ItemCatID, ItemName, ItemShortDesc, ItemLongDesc, ItemPrice, ItemSKU, ItemThumb, ItemImage, ItemWeight, StockStatus FROM items WHERE ItemCatID = 13 AND StockStatus <> 'Sold' ORDER BY ItemPrice ASC";

Seeing you db table and knowing how you store this would help solve the issue if this is not the answer

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





Ease of use


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...