PDA

View Full Version : No MySQL Messages


SuperRoy
10-26-03, 07:08 AM
http://www.sorellejewelrydesigns.com/store.php

There should be a counter at the bottom of the page. Also, when you click on the sections on the left, there should be a listing of items in the MySQL database. It worked on my old server, but won't work on this one. it's on mysql02.powweb.com

What can I be doing wrong?


$Host = "localhost";
$User = "sjd";
$Pass = "xxxxxxxx";
$DBName = "sjd_com";
$TBName = "counters";
$Link = mysql_connect($Host,$User,$Pass);
mysql_select_db($DBName,$Link);
$query = "UPDATE $TBName SET counter = counter + 1 WHERE id='1'";
mysql_query($query,$Link);
$query = "SELECT counter FROM $TBName WHERE id='1'";
$result = mysql_query($query,$Link);
while($Row = mysql_fetch_array($result))
$counter = $Row['counter'];
mysql_close($Link);
echo "<center><font style=\"font-family: Tahoma;font-size: 10px;text-decoration: none;
color: 5A5A5A;\">$counter</font></center>";

By the way, here is how the "counters" table is setup.

Table: Counters
id | counter
&nbsp;1 | 150

Anyone?

The Visitor
10-26-03, 09:04 AM
Originally posted by SuperRoy



$Host = "localhost";




This is wrong. Should be your mysql server (mysql02.powweb.com).

SuperRoy
10-26-03, 09:10 AM
Thanks! My problem wasn't even some PHP error. It was me uploading the wrong files. I have two different folders for this site...and I updated the files in one folder, but uploaded the other folder. Sorry.

Also, another quick question...sorta stupid though.

Is there anyway to limit my Cable Modem's speed? I want to see how the site appears on a 56k modem, but I don't have immediate access to a 56k modem. Sounds lame, doesn't it?? heh..

jimnyc
10-26-03, 09:23 AM
Here's a good program I have used in the past to throttle bandwidth:

http://www.pctip.ch/Downloads/dl/24704.asp