The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
MySQL SELECT question
Im new to the whole hacking sceen so if this was answered a long time ago Im sorry.
Is it possible to include wildcards in select statements? for instance: SELECT db.table.colum FROM db.table HAVING db.table.colum2 = *'Member of the Month'* The problem Im haveing is our board has some extra credits like Member of the Month, Court Jester, etc .. and we can't create new user groups due to the fact that we wish to keep the old User Title their. TIA!!! |
#2
|
||||
|
||||
Yes you can, you use LIKE. Just remember that % is a wildcard, not *.
[sql]SELECT db.table.column FROM db.table WHERE db.table.column2 LIKE '%Member of the Month%';[/sql] Just don't use this on large tables since it will cause a huge table scan. And avoid using wildcards at the beginning so MySQL can use the index on that column (if there is one). You can also use regular expressions in MySQL, just use REGEXP followed by the expression. Docs: http://www.mysql.com/doc/S/t/String_...functions.html |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|