Jump to content

A Wildcard for nothing there at all?


motorcity

Recommended Posts

Database;

MySQL 5.0.96-community-log

 

This is a pretty basic question.

 

UPDATE products p

SET p.products_status = 0, p.vendors_prod_comments = "not in warehouse"

WHERE p.shelf_pack = 0

AND p.products_quantity < 1

AND p.inventory < 1

AND p.spec_code = ?

 

The p.spec_code column is; varchar(1) latin1_swedish_ci NULL=No DEFAULT= None

 

 

The query works just fine but I'm adding the last line and the data in that column is a multiple choice of letters, It could be A, B, C, or any of about ten different letters. But for the purpose of the query I'm trying to find where the row entry is simply blank. No value given.

Is there a wildcard I could use here?

Something in the place of my ? mark that would only result if there was no value given.

 

I'm pretty new at this but any ideas would be greatly appreciated.

 

As an afterthought, I could probably change that column to default to something, but the question stands. Is there a way?

Link to comment
https://forums.phpfreaks.com/topic/273886-a-wildcard-for-nothing-there-at-all/
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.