News:

Click here for Toll-Free Service for your business starting at $2.00 per month

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - catterz

#1
Support Requests / Cannot connect to Database
May 10, 2007, 01:07:56 PM
Having problems connecting to my database on mysql5.freepgs.com

It's been working fine for the last few weeks now it's suddenly gone down. Any news on the situation? Or where do I go to find general downtime announcements?
#2
Support Requests / PHP/MySQL Code Problem
March 18, 2006, 02:18:44 PM
I am having trouble accessing information from a database which I created. I am learning how to interact with a MySQL database using PHP. I created the database using PHP code, and then checked here to see if the database had been added, which it had. Then I added a few entries to a table, which went in no problem.

Now I am trying to access the information, but am getting no results. I am using the same code on each page to open the database and config, so this isn't the problem. I am using the following code to try and troubleshoot the problem:

@mysql_select_db($dbname) or die("Couldn't connect to DB");

$query="SELECT * FROM homepage";
$result=mysql_query($query);

if ($result=="")
{ echo "Result is blank"; }
else
{ echo $result; }


'homepage' is the name of my database. The result keeps coming out "Result is blank". I've tried replacing the '*' with the fieldnames, but still I get the same result. Can anyone tell me where I'm going wrong?