Techware Labs Header

Forums have moved

See this announcement for more details, or just go directly there.

  #1  
Old 07-03-2002, 11:29 AM
Aemon_ Aemon_ is offline
Platinium Techie
 
Join Date: Apr 2002
Location: Brandon, UK
Posts: 928
Send a message via AIM to Aemon_
Default 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.
__________________

Reply With Quote
  #2  
Old 07-03-2002, 12:45 PM
Uranium-235's Avatar
Uranium-235 Uranium-235 is offline
Administrator
 
Join Date: Nov 2001
Location: Mansfield, TX
Posts: 2,469
Send a message via ICQ to Uranium-235 Send a message via AIM to Uranium-235
Default Re: SQL problem! help!

You're using coldfusion? ugg use MySQL. Looks easier then that

oh sorry I can't help you with that
Reply With Quote
  #3  
Old 07-03-2002, 01:52 PM
Aemon_ Aemon_ is offline
Platinium Techie
 
Join Date: Apr 2002
Location: Brandon, UK
Posts: 928
Send a message via AIM to Aemon_
Default 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.
__________________

Reply With Quote
  #4  
Old 07-03-2002, 04:29 PM
Uranium-235's Avatar
Uranium-235 Uranium-235 is offline
Administrator
 
Join Date: Nov 2001
Location: Mansfield, TX
Posts: 2,469
Send a message via ICQ to Uranium-235 Send a message via AIM to Uranium-235
Default 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
Reply With Quote
  #5  
Old 07-03-2002, 04:42 PM
Aemon_ Aemon_ is offline
Platinium Techie
 
Join Date: Apr 2002
Location: Brandon, UK
Posts: 928
Send a message via AIM to Aemon_
Default Re: SQL problem! help!

hey thanks alot.

later.
__________________

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 07:58 AM. Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Forum style by ForumMonkeys.