|
Posted by Harold Ralston on 03/31/06 05:10
I have been trying to learn enough PHP and MySQL to use a query with
one of my genealogy data pages, instead of viewers needing to browse
through it all. What little I have learned is from the Library Books
at our local library.
This PHP code works fine until I insert the line beginning with AND,
then it won't execute.
Have I missed some punctuation?
Thanks for any help.
$query = "SELECT pictures.markername, pictures.image,
pictures.field1, places.place
FROM pictures,places
WHERE (pictures.place_id=places.place_id)
AND (pictures.markername LIKE $surname )
ORDER BY pictures.markername ASC";
$result = mysql_query($query)
or die ("Couldn't execute query.");
Navigation:
[Reply to this message]
|