Thread: Rec/Req levels
View Single Post
  #6  
Old 06-12-2015, 05:34 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

Ahh, gotcha. Just drop the WHERE `id`=% bit.

I can see what you were attempting, but it wasn't quite right. % is used for text fields, and is accompanied by the LIKE keyword.

You could use it for things like matching on item name.

Code:
UPDATE `items` SET `reclevel`=0, `reqlevel`=0 WHERE `name` LIKE '% defiant %';
But when it comes to numbers, there's no such matching. You can use "WHERE `id` IN (1, 2, 3, 4, 5, 6)" or "WHERE `id` BETWEEN 1001 AND 1009" or "WHERE `id`>0", but the percent sign isn't used for number field matching.
Reply With Quote