PHP and Oracle
| From: | GEORGINA ELAINE BAILEY | Date: | Tue, 11 Dec 2001 18:34:45 +0000 |
| Subject: | PHP and Oracle | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-14940@lists.php.net to get a copy of this message | ||
Can anybody help me! I've been getting a error message like this for the last few days.
Warning: OCIStmtExecute: ORA-01722: invalid number on line 49
Array
Every time I try to enter a project using a HTML form
Line 49 in apparently the line that says:
$result = OCIExecute(ins_statement);
Below is the code I am trying to use:
//insert relevant values into the project table
$insert = "insert into PROJECT values ('$projectID', '$moduleID', $keyID,
'$title', '$originator', '$softwareHardware',
'$specialSkills', '$status', '$externalAgreement',
'$background', '$tasks', '$steps', '$references')";
//formulate the query
$query = "select projectID, moduleID, title, originator, softwareHardware,
specialSkills, status, externalAgreement,
background, tasks, steps, references from PROJECT WHERE
projectID='$projectID'";
//parse the two statements
$ins_statement = OCIParse ($connection, $insert);
$qry_statement = OCIParse ($connection, $query);
//execute the first insert statement and print error message if there is an error
$result = OCIExecute($ins_statement);
if (!$result)
{
echo OCIError($ins_statement)."<p>";
exit;
}
//execute the query statement
OCIExecute($qry_statement);
//retrieve the results of the query statement and present them in the following way
while (ocifetch($qry_statement))
{ etc.etc.