<?php error_reporting(E_ALL); ini_set('display_errors', 1); $link = mysql_connect('mywebsite', 'login', 'password'); if (!$link) { die('Could not connect: ' . mysql_error()); } echo 'Connected successfully'; //Until here, everything is PERFECT, the Connection is established.
//The following piece of code spits out error 500: mysql_select_db("rates"); $query = "SELECT * FROM `table1` WHERE `RateName` LIKE '%res%'"; if ($r=mysql_query($query, $link)) {
我是一名优秀的程序员,十分优秀!