Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Query
Message
De
29/10/2016 22:54:35
 
 
À
Tous
Information générale
Forum:
PHP
Catégorie:
Autre
Titre:
Query
Divers
Thread ID:
01642466
Message ID:
01642466
Vues:
42
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
Répondre
Fil
Voir

Click here to load this message in the networking platform