Guys, I can't use the student database.

Source: Internet
Author: User
How can I not use the student database to ask the experts?
I hit this PHP program, stored under D://WAMP//WWW.

$serverLink = @mysql_connect ("localhost", "root", "") or Die ("Connection Server failed! Program interrupted execution! ");
mysql_query ("Set names ' GBK '");
$dbLink = @mysql_select_db ("Student", $serverLink) or Die ("The current connection server failed! Program interrupted execution! ");
if ($dbLink) {
echo "Select the student database as the current database! ";
}
$close = @mysql_close ($serverLink);
?>


Then wamp the data in the phpMyAdmin to create a student data table.
When running the program is displayed in addition to the current connection server failed, but I have established the Student data table, why not output "Select Student database for the current database!" "I tried to enter the student data sheet, pressed the import key, but showed
1064-you has an error in your SQL syntax; Check the manual, corresponds to your MySQL server version for the right syntax
What's the matter with the master of Qing Dynasty teaching?

Returns


------Solution--------------------
The page is always displayed ("The current connection server failed!") Program interrupted execution! ");

$dbLink = @mysql_select_db ("Student", $serverLink) or Die ("The current connection server failed! Program interrupted execution! ");


Database does not exist student database, first in the database to create this.
------Solution--------------------
Then wamp the data in the phpMyAdmin to create a student data table.
When running the program is displayed in addition to the current connection server failed, but I have established the Student data table, why not output "Select Student database for the current database!" "; I tried to enter the student data sheet

The first thing to explain is the above paragraph, student is the data table or database you created? If it is a data table, then
$dbLink = @mysql_select_db ("Student", $serverLink) or Die ("The current connection server failed! Program interrupted execution! Student in the table, and then using INSERT or select to query the datasheet student should be fine.

If student is a database, [email protected], study where the error occurred.
  • 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.