| View previous topic :: View next topic |
| Author |
Message |
whittinghamj Op
Joined: 21 May 2006 Posts: 103
|
Posted: Sat Aug 25, 2007 11:17 pm Post subject: mysql and tcl help please :D |
|
|
hi guys ok i am writing a mysql search / storage system and need a wee bit of help on this one.
I am going to be searching on EXACT LIKE% and LIKE% in that order. I have the following sql lines that i know work fine
| Code: |
set countrls [mysqlsel $mysql "SELECT COUNT(*) FROM pre WHERE rls = '$text2'" -list]
set countrls [mysqlsel $mysql "SELECT COUNT(*) FROM pre WHERE rls LIKE '$text2%'" -list]
set countrls [mysqlsel $mysql "SELECT COUNT(*) FROM pre WHERE rls LIKE '%$text2%'" -list] |
what i am not sure how to do is run the first one - if nothing found then try the second one, if nothing still move onto the forth one, if still nothing then report nothing found.
i know its to do with "if" and elseif but just not sure of the code - anyone able to help me please.
cheers |
|
| Back to top |
|
 |
YooHoo Owner

Joined: 13 Feb 2003 Posts: 939 Location: Redwood Coast
|
|
| Back to top |
|
 |
|