Fix up SQL usage.

This commit is contained in:
Jeff Teunissen 2001-05-06 02:38:07 +00:00
parent 6fe6c62876
commit e51b4f7bde

View file

@ -160,8 +160,7 @@
function latestNews ($length)
{
if ($sqlAvail)
{
if (sqlAvail) {
$conn = @mysql_pconnect (sqlHost, sqlUser, sqlPass);
if ($conn) {
$query = 'SELECT n_date, n_user, n_news FROM news_main' .
@ -205,7 +204,7 @@
}
$date = "$year-$month";
if ($sqlAvail) {
if (sqlAvail) {
$conn = @mysql_pconnect (sqlHost, sqlUser, sqlPass);
if ($conn) {
$query = 'SELECT n_date, n_user, n_news FROM news_main' .
@ -237,7 +236,7 @@
function searchNews ($string)
{
if ($sqlAvail) {
if (sqlAvail) {
$search = AddSlashes ("%$string%");
$conn = @mysql_pconnect (sqlHost, sqlUser, sqlPass);
if ($conn) {