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

Messages - catterz

#1
Support Requests / Re: Cannot connect to Database
May 10, 2007, 01:46:30 PM
It seems to have cleared up now.
#2
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?
#3
Support Requests / Re: PHP/MySQL Code Problem
March 18, 2006, 08:32:00 PM
Well don't I feel silly. ;D

You'd think I would've been able to suss that one myself. I just relooked through the code and this thread, and I remember saying that 'homepage' was the name of the database. Whoops.

I replaced this with 'member', (the name of the table), and everything works. I should slap myself about now. It's been a long time since I programmed anything.
#4
Support Requests / Re: PHP/MySQL Code Problem
March 18, 2006, 08:14:21 PM
OK. How do I fix that?
#5
Support Requests / Re: PHP/MySQL Code Problem
March 18, 2006, 06:39:45 PM
Using the code:


<?php

include 'config.php';
include 
'opendb.php';

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

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

$i=0;
while (
$i $num) {
$var=mysql_result($result,$i,"mname");

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

}

mysql_close($conn);

?>


I get the following error message:

"Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in \\nas27ent\domains\e\egclan.co.uk\user\htdocs\viewdata.php on line 10"
#6
Support Requests / Re: PHP/MySQL Code Problem
March 18, 2006, 06:34:35 PM
Thanks guys, I'll try those now...
#7
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?