php - Internal Server Error Zend Query -



php - Internal Server Error Zend Query -

is wrong query server encountered internal error or misconfiguration , unable finish request.

please contact server administrator, @@serveradmin@@ , inform them of time error occurred, , might have done may have caused error.

more info error may available in server error log.

$sql = $db->query( "insert users (user_id, title, first_name, last_name, user_identity_id, email_id, password, office_phone_number, public_id, session_id, address_id, created_by, last_modified_by, created_on, last_modified_on, is_activated, is_deprecated, middle_name, cell_phone_number, superviser_name, superviser_email, superviser_phone_number) values( :p_user_id,:p_title,:p_first_name,:p_last_name,:p_user_identity_id,:p_email_id,:p_password,:p_office_phone_number,:p_public_id,:p_session_id,:p_address_id,:p_created_by,:p_last_modified_by,:p_created_on,:p_last_modified_on,:p_is_activated,:p_is_deprecated,:p_middle_name,:p_cell_phone_number,:p_superviser_name,:p_superviser_email,:p_superviser_phone_number)", array( 'p_user_id' => '', 'p_title' => $title, 'p_first_name' => $first_name, 'p_last_name' => $last_name, 'p_user_identity_id' => '', 'p_email_id' => $email, 'p_password' => $pass, 'p_office_phone_number' => $office_ph_no, 'p_public_id' => '', 'p_session_id' => '', 'p_address_id' => '', 'p_created_by' => '', 'p_last_modified_by' => '', 'p_created_on' => '', 'p_last_modified_on' => '', 'p_is_activated' => '', 'p_is_deprecated' => '', 'p_middle_name' => $middle_name, 'p_cell_phone_number' => $cell_ph_no, 'p_superviser_name' => $supervisor_name, 'p_superviser_email' => $supervisor_email, 'p_superviser_phone_number' => $supervisor_ph_no ) ); $db->commit();

this looks you're trying execute pdo statement using named parameters in zend.

first thing check, assume you've started transaction?

also, in experience named parameters same in query in params array, e.g. :param1 $params = array(':param1'=>'data');

i utilize same method described in zf docs "executing statement using named parameters":

$select = 'select col1,col2 my_table con1=:param1 , con2=:param2'; $params = array( ':param1'=> 'somedata', ':param2'=> 'someotherdata' ); $statement = new zend_db_statement_pdo($db,$sql); if($statement->execute($params)){ //ok! }

php zend-db

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -