I am stumped. I am changing my host today and 90% of my sites are all database. I can't seem to query the new database the right way.
This script works fine on the old server but not on the new one.
here are links to the old site and new site...same script
[edit=Republikin]Please no links to adult material or sites containing links to adult material[/edit]
PHP Code:
<?php
include ("include/header.inc.php");
include("include/dbconnect.php");
$result = mysql_query("SELECT * FROM '$table' ORDER BY 'artist'",$db);
$sql = 'SELECT * FROM `musictopten` LIMIT 0, 30 '; echo "<table cellpadding=3 cellspacing=2 border=0 align=center width=100%><tr><td bgcolor=#000000><b>Artist Name</td><td bgcolor=#000000><b>Feature Video Title</td><td bgcolor=#000000><b>Video</td></tr>";
$alternate = "2"; while ($row = @mysql_fetch_array($result)) { $id = $row["id"]; $artist = $row["artist"]; $song1 = $row["song1"];
if ($alternate == "1") { $color = "#555555"; $alternate = "2"; } else { $color = "#222222"; $alternate = "1"; } echo "<tr bgcolor=$color><td>$artist</td><td>$song1</td><td><a href='view1.php?id=$id'>See All Videos</a></td></tr>"; } echo "</table>";
include ("include/footer.inc.php"); ?>
PHP Code:
<?
include("include/config.php");
$db = mysql_connect("$dbserver", "$dbuser", "$dbpass"); mysql_select_db("$dbname",$db); ?>
Not sure what I am doing wrong but I need to get this to work. The new server offers a more updated version of php and mysql so it should work fine and the only part of the code i did change was the @ in front of the query.
Any help would be great and i will give you a credit and a link on my page
__________________
visit my link...um...nevermind
Last edited by Republikin; 12-11-2005 at 03:02 PM..
|