Hi,
I am stuck again over something silly that I can not resolve.
I am using a link to create a dynamic page.
the link is itself written from the same same table that the dynamic page is written from, so the data must be ok (or the link wouldn't be there )
Anyway the link is :
<a href="expert_di sp.php?a=Dave" > Dave Casey </a>
(thats from the source )
Clicking on it runs expert_disp.php :
Now that echo displays :
Expert: Dave
and then I get an error:
could not execute FIND EXPERT query Unknown column 'Dave' in 'where clause'
Now the table has user_id as its Primary Key so why am I getting this error ?
I am not looking in a column Dave but in user_id.
Can anyone help ?
Have mis coded this simple query ?
I am stuck again over something silly that I can not resolve.
I am using a link to create a dynamic page.
the link is itself written from the same same table that the dynamic page is written from, so the data must be ok (or the link wouldn't be there )
Anyway the link is :
<a href="expert_di sp.php?a=Dave" > Dave Casey </a>
(thats from the source )
Clicking on it runs expert_disp.php :
Code:
/*
* expert_disp.php
*
*/
@session_start();
$page="start";
require_once("my_functions.php");
if (@$_SESSION['auth'] == "yes" ){
require_once("mem_head.php");
} // end if
else {
require_once("a_head.php");
} // end if
$expert = safe_sql($_GET["a"]);
echo "Expert: $expert";
$sql = "SELECT * FROM `clients`
WHERE user_id = 'Fred' ";
$result = mysql_query($sql) or die("could not execute FIND MEMBER query". mysql_error() );
$row = mysql_fetch_array($result, MYSQL_ASSOC);
extract($row);
Expert: Dave
and then I get an error:
could not execute FIND EXPERT query Unknown column 'Dave' in 'where clause'
Now the table has user_id as its Primary Key so why am I getting this error ?
I am not looking in a column Dave but in user_id.
Can anyone help ?
Have mis coded this simple query ?
Comment