Fatal error: Call to a member function bind_param() on a non-object in webserver -


<php>     $ueberpruefeaufsvnreintrag = $conn->prepare('select  p_svnr p_patient p_svnr = ? ');         $ueberpruefeaufsvnreintrag  -> bind_param('s', $svnr);         $ueberpruefeaufsvnreintrag  -> execute();         $resul = $ueberpruefeaufsvnreintrag  -> get_result();         $rowav = $resul -> fetch_assoc();         $ueberpruefeaufsvnreintrag  -> close(); </php> 

i error in

my webspace in localhost works fine. idea why?

assuming using php , mysqli (you should really add tags).

apparently $conn->prepare didn't return object. returned false in case of error. reason preparing failed may have several causes. 1 possibility: there syntax error in query. doesn't seem case, there kind of error, instance if p_patient doesn't exist. other causes didn't select right database or didn't make connection @ all.

so, although can't tell exact error, can tell you should check result value of functions, check return (for instance false in case of error), , use appropriate properties , methods more error information, mysqli::$error.


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -