I tried to compile the following and received a
Parse error: syntax error, unexpected T_VARIABLE ... on line 10.
The code:
<?php
require_once "MDB2.php";
$db = MDB2::connect('...');
if (MDB2::isError($db)) {die("Can't Connect: " . $db->getMessage()); }
$insertionTest = 42;
$sql = "INSERT INTO test VALUE($insertionTest)";
$result = $db->query($sql);
?>
I'm not sure what I'm not catching...I've read through this a couple of times. :queasy:
I thought the problem might have to do with "42" being a string and not an integer, and that the field I'm trying to insert it into is set to Integer.
Perhaps I've just misapplied quotation marks. Any help would be appreciated.