I wonder if possible on page load to query the value of a specific colmn and insert the result into another table. My query looks like so
[PHP]
<?
include("includ e/session.php");
?>
<?
$usr = "xxxx";
$pwd = "xxxxx";
$db = "xxxxx";
$host = "xxxxxx";
# connect to database
$cid = mysql_connect($ host,$usr,$pwd) ;
mysql_select_db ($db);
if (mysql_error()) { print "Database ERROR: " . mysql_error(); }
$result = mysql_query("IN SERT INTO audio SELECT pid FROM pix WHERE username='$sess ion->username'");
?>
[/PHP]
I guess the result I'm trying to acheive is that when the page is opened the above query is executed and the pid is queried base of username and inserted into the audio table. I'm not getting any error messages from the query but pid is not being inserted into the audio table..any ideas!
[PHP]
<?
include("includ e/session.php");
?>
<?
$usr = "xxxx";
$pwd = "xxxxx";
$db = "xxxxx";
$host = "xxxxxx";
# connect to database
$cid = mysql_connect($ host,$usr,$pwd) ;
mysql_select_db ($db);
if (mysql_error()) { print "Database ERROR: " . mysql_error(); }
$result = mysql_query("IN SERT INTO audio SELECT pid FROM pix WHERE username='$sess ion->username'");
?>
[/PHP]
I guess the result I'm trying to acheive is that when the page is opened the above query is executed and the pid is queried base of username and inserted into the audio table. I'm not getting any error messages from the query but pid is not being inserted into the audio table..any ideas!
Comment