408 Part IV (My space web page) . Development Of course, you

408 Part IV . Development Of course, you could supply the credentials inside one variable as well (see Figure 15-18). Figure 15-18: Creating the proper credentials inside a variable. $credentials is also a valid way to connect. Also as the credentials portion of the connection can be supplied in a variable, the Datasource could also be supplied in whole or in part by variable interpolation. For example, you could define the host as $host, the database name as $database, and so forth: You could even supply the entire Datasource as a variable, $datasource (or the name of your choosing.) Figure 15-19 illustrates some of these points. Figure 15-19: Specifying portions of the Datasource through the use of variables can help to make the program more readable. Examining what I have defined so far: $dbh = DBI->connect($datasource, $credentials);
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check mysql web server services.

Leave a Reply