I am trying to sort through the names so it goes next and previous from the records within the database, here is how the names look
A.J.
Abby
Abby
Adara Michaels
Adele Stephens
Adina
Adrianna
Adrianne
Adrienne
Africa Sexxx
Aladya
Here is how its actually pulling the info if you start at A.J. and click next:
Aladya
thats a lot of names to skip over. Does mysql not read stuff like A.J. properly?
Here is the code i'm using
function next_model($modelID,$hostname)
{
$s = "SELECT * FROM md_models WHERE modelID > $modelID && sites LIKE '%$hostname%' ORDER BY alias LIMIT 1";
$q = mysql_query($s);
$exist = mysql_num_rows($q);
$r = mysql_fetch_array($q);
if ($exist!=0)
{
$next = '<a href="index.php?cmd=view&modelID='.$r['modelID'].'"><img src="images/model_next.gif" alt="Next Model" border="0" align="bottom" /></a>';
}
return $next;
}
any ideas?