PHP argument string syntax error

Source: Internet
Author: User
Tags php database
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 ()

  • Contact Us

    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.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.