Where can I go to decipher PHP errors messages; specifically, the db2_prepare and db2_bind_param have such generic message, and I am just not experienced enough to know what they mean.
Here is my code:
Code:
// Parse work order number //
$account = "";
$account = $_GET['account'];
// Set up SQL statement //
$sql = 'SELECT ODWONR, ODSYSN, ODSVCD, ODSTYP FROM worddpl2 WHERE ODWONR = ?';
$stmt = db2_prepare($conn, $sql);
// Bind parameters //
db2_bind_param($stmt, 1, "account", DB2_PARAM_IN);
// Execute and display SQL results //
if (db2_execute($stmt)) {
while ($row = db2_fetch_array($stmt)) {
print "{$row[0]}, {$row[1]}, {$row[2]}, {$row[3]} \n";
}
}
It is generating this error message:
Warning: db2_prepare() [function.db2-prepare]: Statement Prepare Failed in /www/zendcore/htdocs/cox/query_workorder.php on line 38
If fails, but why?