From: fatblokeonbike [mailto:[EMAIL PROTECTED]

> $Query="SELECT properties.area, images.image_filename FROM 
> properties, 
> images WHERE properties.reference_number=images.reference_number AND 
> properties.area=$id";
> 
> but it doesn't work - I get the usual "...not a valid MySQL 
> result resource"
> 
> I've played around with it, but I confess myself beat.  I expect the 
> answer's terribly simple - but then, as everyone keeps 
> telling me, so am I.
> 
> If you can help, thanks in advance.


If $id is a string and not an int, then you need to single- or double-quote it.

Try this:

$Query="SELECT properties.area, images.image_filename FROM properties, 
images WHERE properties.reference_number=images.reference_number AND 
properties.area='$id'";

HTH!


-- 
Mike Johnson
Web Developer/Systems Asst.
Smarter Living, Inc.
phone (617) 497-2500 x226

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to