I want to run a simple query in PHP.
user inputs stockname
from this variable I want to search stockcode
in SQL, the query is:
select stockname from stockdata where stockcode=stockcodeid into cursor temp
stocknameid = temp.stockname
I try this in PHP, it doesn't work:
<?php
$stocknameid = "";
if (isset($_REQUEST['stocknameid'])) $stocknameid = $_REQUEST['stocknameid'];
$strSQL1 = "select stockname from stockdata where stockcode=$stockcodeid into cursor temp";
$stocknameid = mysql_query( $strSQL1 )
or die( 'Unable to execute query group.' );
?>
Please advise
Thanks for the help
Jerry