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
Re: cause of error is what? [message #181582 is a reply to message #181573] Wed, 22 May 2013 17:03 Go to previous messageGo to previous message
richard is currently offline  richard   
Messages: 213
Registered: June 2013
Karma:
Senior Member
On Tue, 21 May 2013 21:35:31 -0700, Scott Johnson wrote:

> On 5/21/2013 6:44 PM, richard wrote:
>> $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>";
>>
>> ?>
>>
>
> *JTOL*
>
> I could be wrong but..
>
> Even if you left $number unset, that query should not of returned false
> unless 'id' is not an (int) in your table definition.

FYI, 'id' IS defined as an integer and is the primary key.
[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 11:03:34 GMT 2024

Total time taken to generate the page: 0.04935 seconds