I am trying to run the following code but I keep getting this error:
"Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 35 bytes) in /vweb/stockcontrol/html/script/dbInterface.php on line 610"
Any ideas guys??
function getHW($strOption)
{
include("/vweb/stockcontrol/html/config.php");// Contains connection details
$connection = ocilogon($strUsername,$strPassword,$strDB) or die("Can't login $strDB");
if ($strOption == "All")
{
$tempSQL = "SELECT * FROM hwInfo ORDER BY hiRoomNo";
}// End of If
$stmt = OCIParse($connection, "$tempSQL");
OCIDefineByName($stmt, "HIINFONO", $hiInfoNo);
OCIDefineByName($stmt, "HIROOMNO", $hiRoomNo);
OCIDefineByName($stmt, "HITYPE", $hiType);
OCIDefineByName($stmt, "HIMAKE", $hiMake);
OCIDefineByName($stmt, "HIMODEL", $hiModel);
OCIDefineByName($stmt, "HIDATEPURCHASED", $hiDatePurchased);
OCIDefineByName($stmt, "HIWARRANTY", $hiWarranty);
ociexecute($stmt) or die ("Can't execute : $tempSQL");
$counter=0;
while(ocifetch($stmt))
{
$infoArray[$counter][0] = $hiInfoNo;
$infoArray[$counter][1] = $hiRoomNo;
$infoArray[$counter][2] = $hiType;
$infoArray[$counter][3] = $hiMake;
LINE 610: $infoArray[$counter][4] = $hiModel;
$infoArray[$counter][5] = $hiDatePurchased;
$infoArray[$counter][6] = $hiWarranty;
$tempSQL = "SELECT COUNT(hdSerialNumber) FROM hwDetails WHERE hdInfoNo IN (SELECT hiInfoNo FROM hwInfo WHERE hiRoomNo='$hiRoomNo')";
$stmt1 = OCIParse($connection, "$tempSQL");
OCIDefineByName($stmt1, "COUNT(HDSERIALNUMBER)", $intNoInRoom);
ociexecute($stmt1) or die ("Can't execute : $tempSQL");
OCIFetch($stmt1);
$infoArray[$counter][7] = $intNoInRoom;
$tempSQL = "SELECT COUNT(hdSerialNumber) FROM hwDetails WHERE hdInfoNo IN (SELECT hiInfoNo FROM hwInfo WHERE hiRoomNo='$hiRoomNo') AND hdStatus='Ok'";
$stmt2 = OCIParse($connection, "$tempSQL");
OCIDefineByName($stmt2, "COUNT(HDSERIALNUMBER)", $intNoWorking);
ociexecute($stmt2) or die ("Can't execute : $tempSQL");
OCIFetch($stmt2);
$infoArray[$counter][8] = $intNoWorking;
$counter++;
}// End of While
return $infoArray;
}// End of getHW()