Re: table name as variable in INSERT
use Mysql;
$host = "localhost";
$db = "...";
$table = "test";
$usr = "...";
$pwd = "...";
$name = "Bob";
$connect = Mysql->connect( $host, $db, $usr, $pwd );
$connect->selectdb( $db );
$qry = "INSERT INTO $table VALUES ('$name');
$execute = $connect->query( $qry );
Subject
Written By
Posted
Re: table name as variable in INSERT
July 31, 2011 09:45AM
September 24, 2011 10:37AM
September 24, 2011 10:39AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.