php - MySql Pages on the Fly -
problem solved
the answer was
$query = "select manager tablename manager='$manager'"; subtle difference, removing dots before , after $manager answer.
credit phpfreaks.com
i had this;
<?php include 'dbdetails.php'; $id = mysql_real_escape_string($_get['id']); $query = 'select `column` `tablename` `id` = '.$id.' '; $result = mysql_query($query); $row = mysql_fetch_array($result); echo $row['column']; ?> (taken here)
this works fine if solely working id, have repeated values in column need work id not work trying achieve.
essentially trying create pages on fly using manager column query opposed id.
what correct way achieve this? presume distinct comes play?
i aiming for;
<a href="sitename.com/?manager=micky adams">micky adams</a> as structure, fetches instances of micky adams or whichever manager name set anchor.
if changed to:
$manager = $_get['manager']; $query = 'select `column` `tablename` `manager` = '.$manager.' '; wouldn't achieve want? if had more 1 instance of manager distinct partly helps depending how data stored.
Comments
Post a Comment