Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Query
Message
From
29/10/2016 22:54:35
 
 
To
All
General information
Forum:
PHP
Category:
Other
Title:
Query
Miscellaneous
Thread ID:
01642466
Message ID:
01642466
Views:
41
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
Reply
Map
View

Click here to load this message in the networking platform