Closed Thread Icon

Topic awaiting preservation: mysql problem.. (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=12972" title="Pages that link to Topic awaiting preservation: mysql problem.. (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: mysql problem.. <span class="small">(Page 1 of 1)</span>\

 
shalvi
Nervous Wreck (II) Inmate

From:
Insane since: Oct 2003

posted posted 11-06-2003 20:56

here the syntax is okk...but the code does not get any value....is there any problem in the LIKE ?help...

code
_____________________________________________________________________
user = mysql_query("SELECT Fname,Lname,
Tel,address,level,cityname,subj
FROM detail,city,subject
WHERE detail.AID=city.AID
AND city.AID=subject.AID AND cityname='$cityname' AND subj LIKE '$subjectid' ");

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 11-06-2003 21:02

shalvi: If you are taking data from multiple tables you should specify the table names like detail.FName, etc.

___________________
Emps

The Emperor dot org

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 11-06-2003 22:04

actually, emps that's wrong: You only have to specify them when their ambigious.

Your problem, shalvi, is that LIKE 'something' works like = 'something'. You'll need to add placeholders (usally % - any character - any number of times, or no charater), either at the beginning or at the end, or both.

The manual would've told you.

« BackwardsOnwards »

Show Forum Drop Down Menu