0

i'm a new guy on these and I have a problem with the "Appointment Booking Pro Component"

It shows me an error while i'm trying to make a "bookoff" on frontend

The error is:

1064 YOU HAVE AN ERROR IN YOUR SQL SYNTAX; CHECK THE MANUAL THAT CORRESPONDS TO YOUR MYSQL SERVER VERSION FOR THE RIGHT SYNTAX TO USE NEAR '' AT LINE 3 SQL=SELECT MAX(ORDERING) FROM F3CBW_SV_APPTPRO3_BOOKOFFS WHERE ID_BOOKOFFS =

The code is:

{
    $query = "SELECT #__users.name FROM #__users JOIN #__sv_apptpro3_bookoffs ON #__sv_apptpro3_bookoffs.checked_out = #__users.id ".
    " WHERE #__sv_apptpro3_bookoffs.id_bookoffs = ". $this->_id_bookoffs;           
    $this->_db->setQuery($query);
    $locked_by = $this->_db->loadResult();
    return $locked_by;
}

Please help me, i cant find the syntax error. Thanks

John Conde
  • 217,595
  • 99
  • 455
  • 496

1 Answers1

0

Judging by the error message $this->_id_bookoffs has no value and is producing an invalid WHERE clause in your query. You should verify it has a valid value before executing your query.

John Conde
  • 217,595
  • 99
  • 455
  • 496