FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » cause of error is what?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
cause of error is what? [message #181567] Wed, 22 May 2013 01:44 Go to previous message
richard is currently offline  richard   
Messages: 213
Registered: June 2013
Karma:
Senior Member
Can't get past the error message.
Could not run query: 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 '' at line 1
www.mroldies.net/menu2.php


<?php

$year=$_GET["year"];
if (empty($year)) {$year=1900;}
$year=(int)$year;

/* connect to the db */
$con = mysql_connect('localhost','user','pass');


if (!$con){die("can not connect: " . mysql_error());}

mysql_select_db('richbull_top100',$con);

echo "<div style='clear:left;'>";

if ($year==1900){echo '<iframe width="1000" height="500" src="test2.php"
frameborder="0"></iframe>';}
else {echo $year."\n";

$result = mysql_query("SELECT atitle,artist,avid FROM A$year WHERE id =
$number");
if (!$result) { echo 'Could not run query: ' . mysql_error(); exit; }
$vid = mysql_fetch_row($result);

echo $vid[0];

}

echo "</div>";

?>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Google Voice App Comes To iPhone
Next Topic: use a value form a manu list in a form on the same page
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 06:58:54 GMT 2024

Total time taken to generate the page: 0.20789 seconds