Is the insert time in the Zend framework combined? My SQL has been having problems. What do you mean, supportsparameters?
I am in the controller:
$table = new Model_users ();
$DD = Array (' username ' = = $username, ' password ' =>md5 ($password), ' name ' = = $name, ' email ' + $email,
' Reg_time ' =>date ("y-m-d h:m:s", Time ()), ' ipaddr ' =>$_server[' remote_addr ']);
$test = $table->insert ($DD);
Then there was the error that I tracked after I found my SQL in the Public function insert ($table, array $bind) in Zend_db_adapter_abstract
In $this->supportsparameters (' positional '), all the values in the table are set to "? "What is the meaning of this function, please?"
Is it a problem with the configuration of the database?
Code: Zend_db_adapter_abstract in 549cell.
------Solution--------------------
You first look at the value returned by the $this->supportsparameters (' positional ')
Better stick it out.
Check to see if the variable you are assigning is associated with? Same number, whether the variable name is consistent with the corresponding field name when assigning the value
------Solution--------------------
1. Depending on your db Adapter, ZENDDB may have called mysqli or PDO MySQL, both of which have the bind operation function, and then the code runs to the C part of the function.
2. Not Error-log, is the log of MySQL, generally my.cnf may not open,
See here: http://www.howtogeek.com/howto/database/monitor-all-sql-queries-in-mysql/
discuss
Upstairs, thank you, smooth solution, through the try catch, here are two questions do not understand, hope advice!
1. How do we use the bottom C? Can there be a simple example?
2. I went to MySQL to find Log,show error-log, but I can't seem to see anything here?
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.