TAILIEUCHUNG - PHP & MySQL for Dummies- P3

Tham khảo tài liệu 'php & mysql for dummies- p3', công nghệ thông tin, cơ sở dữ liệu phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | _Chapter 4 Building the Database 8 3. If you re starting the mysql client to access a database across the network use the following parameter after the mysql command -h host host is the name of the machine where MySQL is located. For instance if you re in the directory where the mysql client is located the command might look like this mysql -h -u root -p Press Enter after typing the command. 4. Enter your password when prompted for it. The mysql client starts and you see something similar to this Welcome to the MySQL monitor. Commands end with or g. Your MySQL connection id is 459 to server version Type help or h for help. Type c to clear the buffer. mysql 5. Select the database that you want to use. At the mysql prompt type the following use databasename Use the name of the database that you want to query. 6. At the mysql prompt type your SQL query followed by a semicolon and then press Enter. The mysql client continues to prompt for input and does not execute the query until you enter a semicolon. The response to the query is displayed onscreen. 7. To leave the mysql client type quit at the prompt and then press Enter. Using PHP scripts Because this book is about PHP and MySQL the focus is on accessing MySQL databases from PHP scripts. PHP and MySQL work well together. PHP provides built-in functions to interact with MySQL. You don t need to know the details of interacting with the database because the functions handle all the details. You just need to know how to use the functions. PHP functions connect to the MySQL server select the correct database send a query and receive any data that the query retrieves from the database. I explain using PHP functions to interact with your MySQL database in detail in Chapter 8. Please purchase PDF Split-Merge on to remove this watermark. 82 Part II MySQL Database_ Building a Database

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.