...

View Full Version : Error only on 1 php page connecting to db...



tomyknoker
02-19-2008, 03:21 AM
I keep getting the following error but am connecting no differently to my database than any other page, is there elements that could effect this?


Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/domains/html/file.php on line 180

Line 180 looks like so...


$quer2=mysql_query("SELECT DISTINCT category,cat_id FROM category order by category");


At the top of my php I have this...


<?php
if($_SESSION['session_started'] != "TRUE") session_start();
require_once("php/funct.php");
require_once("database/db.php");
?>

And there is no problem connecting on any other page so I am totally confused...

Inigoesdr
02-19-2008, 06:13 AM
What page is your connection code in? Add or die(mysql_error()); after the mysql_connect() call.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum