Chris wrote:
Here is the code I use:
[snip]
$sql =& $db->prepare("INSERT INTO ExitSurveyAnswers (session_id,
Question_id, answer) VALUES ?,?,?");
[snip]
When I execute it I keep recieving and error message stating:
DB Error: syntax error
Not a MSSQL expert, but shouldn't the ?,?,? in your query hav
Here is the code I use:
$dsn = "mssql://username:[EMAIL PROTECTED]/database";
$options = array(
'debug' => 2,
'portability' => DB_PORTABILITY_ALL,
);
$db =& DB::connect($dsn, $options);
if (DB::isError($db)) {
$db->getDebugInfo();
die($db->getMessage());
}
$sql =& $db->prepare("
>$query = "INSERT INTO myTable VALUES ('".$myVar."');';
Check the commas?
Miles
At 05:50 PM 3/28/2004 +1200, Martin Ryan wrote:
Got a dumb-ass question for you all. I have got insert queries working with
mssql_query($query); except if any of the variables have two or more words.
For example:
$myVa
Got a dumb-ass question for you all. I have got insert queries working with
mssql_query($query); except if any of the variables have two or more words.
For example:
$myVar = "Two or more words";
$query = "INSERT INTO myTable VALUES ('".$myVar."');';
mssql_query($query,$db);
The query will only in
I insert a new record with PHP into my MS SQL Server database.
The key is defined with
auto_idINT IDENTITY(1000,1) NOT NULL,
how do I get the new id to use it in PHP?
To insert the record I use this code:
$sSql = "INSERT INTO myTable (time_in ) VALUES ( getdat