Hello, everyone.
In attempt to make age search i downloaded script "phpenpals'
from
http://www.hotscripts.com/Detailed/12939.html
i edited it to my liking
but the lines where i changed nothing:
$checkage="(( bday<='$day' AND bmonth<='$month' AND byear='$year1' )
OR ( byear<'$year1' )) AND
(( bday<='$day' AND bmonth<='$month' AND byear='$year2' ) OR ( byear>'$year2' ))" ;
i guess cause the following mistake:
"You have an error in your SQL syntax near 'and photos WHERE (( bday<='11' AND bmonth<='7' AND byear='1985' ) OR ( byear<'' at line 1"
oh, and here's next lines which might be helpful as well
$con = mysql_connect("localhost","database","password")or die(mysql_error());
mysql_select_db("db",$con)or die(mysql_error());
$query="SELECT * FROM members and photos WHERE ".$checkage." AND id=photos.memberid";
$result = mysql_query($query)
or die(mysql_error());
if there's anhone who could help me by advising smth appropriate,
I woould be thankful very much!