#37065 [NEW]: error in mysqli

From: Date: Thu, 13 Apr 2006 05:23:29 +0000
Subject: #37065 [NEW]: error in mysqli
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-31176@lists.php.net to get a copy of this message
From: goliraja at yahoo dot com Operating system: windows 2000 PHP version: Irrelevant PHP Bug Type: Website problem Bug description: error in mysqli Description: ------------ Fatal error: Call to a member function bind_param() on a non-object in C:\wamp\www\deftmd\classes\DAL\AppointDAO.php on line 151 iam getting almost all file this erroe Reproduce code: --------------- public function insert(&$conn, Appoint &$appt) { $start_time = strtotime($appt->appt_start_ts); Debug::createInstance()->println("Inside AppointDAO Insert " . $appt->starthour ); $start_time = $start_time + $appt->starthour * 60 * 60; $end_time = $start_time + $appt->duration * 60; $appt->appt_start_ts = date('Y-m-d H:i:s', $start_time); $appt->appt_end_ts = date('Y-m-d H:i:s', $end_time); Debug::createInstance()->println("Inside AppointDAO Insert ". $appt->appt_start_ts); Debug::createInstance()->println("Inside AppointDAO Insert ". $appt->appt_end_ts); try { Debug::createInstance()->println("Inside AppointDAO Insert Provider "); Debug::createInstance()->println("Inside AppointDAO Insert Provider ". $appt->duration); Debug::createInstance()->println("Inside AppointDAO Insert Provider ". $appt->provider->id); $InsertSQL = "INSERT INTO APPOINTMENTS(APPT_TYPE, EVENT, EVENT_DESC, APPT_START_TS, DURATION, APPT_END_TS, PROVIDER_ID, LOCATION_ID) VALUES(?,?,?,?,?,?,?,?)"; $stmt = $conn->prepare($InsertSQL); $stmt->bind_param("ssssisii", $appt->appt_type, $appt->event, $appt->event_desc, $appt->appt_start_ts, $appt->duration, $appt->appt_end_ts, $appt->provider->id, $appt->location_id ); $stmt->execute(); $appt->id = $stmt->insert_id; Debug::createInstance()->println("Inside AppointDAO Generated ID ". $appt->id); if ($appt->patient->id != null) { $UpdateSQL = "UPDATE APPOINTMENTS SET PATIENT_ID=? WHERE ID=? "; $stmt = $conn->prepare($UpdateSQL); Debug::createInstance()->println("Inside AppointDAO Update "); $stmt->bind_param("ii", $appt->patient->id, $appt->id); $stmt->execute(); Debug::createInstance()->println("Inside AppointDAO Update Executed "); } $stmt->close(); } catch(Exception $e) { $stmt->close(); throw new SQLException("Unable to insert record into Appointments Table"); } } Expected result: ---------------- create a record -- Edit bug report at http://bugs.php.net/?id=37065&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37065&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=37065&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37065&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37065&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37065&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37065&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=37065&r=needscript Try newer version: http://bugs.php.net/fix.php?id=37065&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37065&r=support Expected behavior: http://bugs.php.net/fix.php?id=37065&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37065&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37065&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37065&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37065&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37065&r=dst IIS Stability: http://bugs.php.net/fix.php?id=37065&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37065&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37065&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37065&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=37065&r=mysqlcfg

« previous php.mirrors (#31176) next »