NeXDesigns 0 Report post Posted May 5, 2005 why when my hosting credits fall to 0, it jumps to -4? is there something wrong or what is it?Another thing is, can anyone give me an example script of how to make it pull tables from the database and then format it correctly for the site (like in the proper tables on the site, and have it repeat the tables for like a list of it?)like say on http://www.good-tutorials.com/ something in that order, how would i do that? Share this post Link to post Share on other sites
whyme 0 Report post Posted May 6, 2005 your hosting credits will continue to drop, as you use up 1 hosting credit per day, therefore, if you haven't posted in four days, then you'll have lost 4 more hosting credits, meaning you have -4. That's why it's highly suggested you have at least 10 days of hosting credits.My MySQL knowledge is, in my humble opinion, rather slacky, but here's what you can do to display the data. <?$username="username";$password="password";$database="your_database";mysql_connect(localhost,$username,$password);@mysql_select_db($database) or die( "Unable to select database");$query="SELECT * FROM contacts";$result=mysql_query($query);$num=mysql_numrows($result);mysql_close();echo "<b><center>This is the MySQL Data</center></b><br><br>";$i=0;while ($i < $num) {$data1=mysql_result($result,$i,"dataone");$data2=mysql_result($result,$i,"datatwo");echo "$data1 <br> $data2 ";$i++;}?> Simple add more variables and more echo statements as you would like to display your data.hope this helps,whyme Share this post Link to post Share on other sites
NeXDesigns 0 Report post Posted May 6, 2005 the credits went from 0.31 to -4.97 in 12 hours. and ill try to work with the code to see how it will work, thanks Share this post Link to post Share on other sites
whyme 0 Report post Posted May 6, 2005 in that case, a moderator may have deleted your post, and that would have resulted in the lost of your credits. Share this post Link to post Share on other sites