PHP Database
I'm looking at someone else's code, and it's hard to find the arguments and the single double quotes in the string.
I put the stuff on, and the implementation was basically removed.
Use of other people's class, do not know right, help to see it, anyway always wrong, I put the wrong place is posted up
Where the error was called
The first $database = new AAAA ([ ' database_type ' = ' mysql ', ' database_name ' = ' web_paris_station ', ' Server ' + ' localhost ', ' username ' + ' root ', ' password ' = ' root ', ' charset ' and ' UTF8 ', ' option ' = = [Pdo::attr_case = Pdo::case_natural],]);//Second $datas = $database->insert ("sell", [ "Brand" = > $_post[' brand ', ' style ' = ' $_post[' style ', ' price ' = ' $_post[' price ', ' condition ' and ' $_ post[' condition ', "description" + $_post[' description '], ' image ' = ' upload/'. $_files["File" [" Name "] ]);//Third $datas = $database->select ( " User ", [" * "], [" where "=" = "=" email = ". $_post[' Email ']] );
Class aaaa{protected $database _type = ' mysql ';//For MySQL, MSSQL, sybaseprotected $server = ' localhost ';p rotected $userna Me = ' username ';p rotected $password = ' password ';//for sqliteprotected $database _file = ';//optionalprotected $charset = ' UTF8 ';p rotected $database _name = ';p rotected $option = Array ();p ublic function __construct ($options) {}public function query ($query) {}public function exec ($query) {}public function quote ($string) {}protected function array_quote ( $array) {}protected function Data_implode ($data, $conjunctor, $outer _conjunctor = null) {}public function Where_clause ($ where) {}public function Select ($table, $columns, $where = null) {}public function Insert ($table, $data) {}public function u Pdate ($table, $data, $where = null) {}public function Delete ($table, $where) {}public function replace ($table, $columns, $s Earch = null, $replace = NULL, $where = null) {}public function get ($table, $columns, $where = null) {}public function has ($ Table, $where) {}public function count ($table, $where = null) {}public function max ($table, $column, $where = null) {}public function min ($table, $column, $where = null) {}public function avg ($table, $column, $where = null) {}public function sum ($table, $column, $where = null) {}public functio N Error () {}public function last_query () {}public function info () {}}
Reply to discussion (solution)
Write Array () as [] php5.4 function
1. Upgrade PHP version to 5.4
2. Change all [] to array ()