![]() |
SQL problem! help!
ok people, i've been messing with this for a few days, and just cant figure it out. its a stupid easy problem i think, that i just cant figure it out! grrrr, one of those days. ok, i want to search two fields in my database, from one dropdown box. if thats not a very clear explaniation, heres what i have in the way of code right now. i'm using coldfusion by the way.
<cfquery datasource="mapbase" name="mapdb"> SELECT ALAV, MUNICI, COUNTY, LNUMBER, BIBTITLE, MAINTRY, DATE, SUBHEAD1, SUBHEAD2, SUBHEAD3 FROM Mapdb WHERE 0=0 <cfif #form.sub3# is not ""> AND SUBHEAD1 LIKE '%#FORM.sub3#%' OR SUBHEAD2 LIKE '%#FORM.sub3#%' </cfif> </cfquery> any and all help is very very very appreciated guys. thanks! later. |
Re: SQL problem! help!
You're using coldfusion? ugg use MySQL. Looks easier then that
oh sorry I can't help you with that :( |
Re: SQL problem! help!
hey thanks for your attempted help uranium. but i'm at work and we run coldfusion here. but i just figured it out. i was using the wrong operators, and the way that this database is set up, i was searching all wrong anyway. so i have it figured out. thanks again man.
so, i know next to nothing about anything other than using paradox and coldfusion for database searchability, can you tell me more about mySQL and PHP and such? thanks! later. |
Re: SQL problem! help!
PHP looks easier when working with mysql. You use a Mysql connect function first
mysql_connect("Ip Address", "Username", "password"); Then once you're connected you use query functions. $query = mysql_query("SELECT * FROM table WHERE row=value"); It's harder to explain like that so I'll provide a link http://www.php.net/manual/en/ref.mysql.php |
Re: SQL problem! help!
hey thanks alot.
later. |
| All times are GMT -5. The time now is 05:39 PM. |
Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.