Forum Moderators: coopster
$table_name2 = "bob_storys";
$sql2 ="SELECT CASE isnull(id)
WHEN 1 then 'Story (0)'
ELSE CASE rtrim(id)
WHEN '' then 'Story (0)'
ELSE CONCAT('<a href=http://www.example.com/battle_bands_sherlocks/band_battle_.php?story=',id,'>View story ()</a>')
END END id, band_name FROM $table_name2 WHERE $band_name = band";
$result2 = mysql_query($sql2, $connection) or die (mysql_error());
$num = mysql_num_rows($sql2, $connection) or die (mysql_error());
while ($row = mysql_fetch_array($result2)) {
$story = ($row['id']);
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Story = band' at line 6
<Sorry, no personal URLs.
See Terms of Service [webmasterworld.com]>
[edited by: tedster at 10:13 pm (utc) on Feb. 12, 2006]
[edit reason] use example.com [/edit]