Errors and causes in PHP that are prone to getting query results from a database (Smarty)

Source: Internet
Author: User

<--{a fall into, your wit}-->

One: Some undefined errors are reported when viewed in the browser:

1. In the query of this day SQL statement may use you in another HTML, the variable name may be wrong, or the variable may not get the value;

2.SQL statement may be wrong, note the column name and table name;

3. Some queries are query after clicking the button, the action path of form form may be wrong;

4. When viewing PHP and HTML files, no code is unified;

5. See if the PHP file is mapped to HTML code;

Two: blank when viewing in browser

1. When viewing PHP and HTML files, no code is unified;

2. See if there is data in the database that conforms to the conditions of the SQL statement;

3. See if there is an error in the Smarty display () in the PHP file

Three: Error errors

1.config.php the path to the file and whether the database is selected correctly;

Four: Method error

1. The method name is incorrectly written. e.g. Mysql_fetch_array () written in Mysql_fetch_query ();

2. When a mysql_fetch_array () error occurs, the SQL statement usually has an error

Errors and causes in PHP that are prone to getting query results from a database (Smarty)

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.