Re: cause of error is what? [message #181586 is a reply to message #181582] |
Wed, 22 May 2013 23:42 |
Scott Johnson
Messages: 196 Registered: January 2012
Karma:
|
Senior Member |
|
|
On 5/22/2013 10:03 AM, richard wrote:
> 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.
>
I was just wondering because I have seen these issues in the past when I
am first coding and testing and some data does not populate properly.
It was a fleeting thought and nothing other.
Hope the rest of your project is moving forward.
Scotty
|
|
|