. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 765
?– CHAPTER 30 Using PHP with MySQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 767
Handling Installation Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 768
Enabling the mysqli Extension on Linux/Unix . . . . . . . . . . . . . . . . . 769
Enabling the mysqli Extension on Windows. . . . . . . . . . . . . . . . . . . 769
Managing User Privileges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 769
Working with Sample Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 769
Using the mysqli Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 770
Setting Up and Tearing Down the Connection. . . . . . . . . . . . . . . . . 770
Handling Connection Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 772
Retrieving Error Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 772
Storing Connection Information in a Separate File . . . . . . . . . . . . . 774
Securing Your Connection Information. . . . . . . . . . . . . . . . . . . . . . . 775
Interacting with the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 775
Sending a Query to the Database . . . . . . . . . . . . . . . . . . . . . . . . .
Pages:
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56