Incantius
7-15-03, 06:08 PM
I have been trying to get a simple questionnaire page built. My problem is that no matter what I use (prepare/execute, or in-line execution) the entire script works *except* the actual SQL update/insert. Here is the code as it stands now:
function WriteRecord(mainx,statsx,lookingforx,new2EQx,rolex )
{
<?php
$db = mysql_connect("mysql02.powweb.com", "Incantius", "xxxxxxxx");
mysql_select_db("siv_forum",$db);
$sql = "SELECT * FROM questionnaire WHERE main=mainx";
$result = mysql_query($sql);
if ($myrow = mysql_fetch_array($result)) {
$sql = "update questionnaire set main=mainx, stats=statsx, lookingfor=lookingforx, new2EQ=new2EQx, role=rolex where main=mainx";
} else {
$sql = "insert into questionnaire values(mainx,statsx,lookingforx,new2EQx,rolex)";
}
$result = mysql_query($sql);
?>
anyway thanks in advance for any & all assistance!!!
function WriteRecord(mainx,statsx,lookingforx,new2EQx,rolex )
{
<?php
$db = mysql_connect("mysql02.powweb.com", "Incantius", "xxxxxxxx");
mysql_select_db("siv_forum",$db);
$sql = "SELECT * FROM questionnaire WHERE main=mainx";
$result = mysql_query($sql);
if ($myrow = mysql_fetch_array($result)) {
$sql = "update questionnaire set main=mainx, stats=statsx, lookingfor=lookingforx, new2EQ=new2EQx, role=rolex where main=mainx";
} else {
$sql = "insert into questionnaire values(mainx,statsx,lookingforx,new2EQx,rolex)";
}
$result = mysql_query($sql);
?>
anyway thanks in advance for any & all assistance!!!