im trying to test code that will create an xml file from mysql using php.im trying to test it.i have the ipaddress and passwords, username, etc.my computer is not on the server that holds 开发者_C百科the database.is there a way i can link to it to test if my code is right?
mysql_connect($ipAddress, $username, $password); //connects to the machine with given IP
mysql_select_db($database_name); //selects specific database on that server
If you can connect to the distant DB with the info in your possession yes. You'll have to test first if you can open the connexion w/ the DB, then run your code.
If you can't, you still can create an array like it was done by a mysql_fetch_array or mysql_fetch_row to test your code.
精彩评论