Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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