I'm querying a table containing data on a few (6, precisely) fonts. Conicidentally, each font has six characteristics I'm interested in. So the table has six rows and six columns.
function getFont($id){
global $fRA;
$qr = 'SELECT * FROM pda_font';
$re = mysql_query($qr) or die(mysql_error());
$nrows = mysql_num_rows($re);
$fRA = array();
$fRA = array('ffile'=>mysql_result($re,$id,'fontfile'), 'fSize'=>mysql_result($re,$id,'fontsize'), 'fWrap'=>mysql_result($re,$id,'wordwrap'), 'fSplit'=>mysql_result($re,$id,'wordsplit'), 'fname'=>mysql_result($re,$id,'fontname'), 'fw'=>mysql_result($re,$id,'w'));
}
But something's wrong. Instead of the use of the selected font, I get a screen filled with six repetitions of:
Warning: mysql_result() [function.mysql-result]: Unable to jump to row -1 on MySQL result index 11 in /usr/www/xxx/yyy/zzz/sqlFetch3.php on line 53
And then, six more repetitions:
Warning: mysql_result() [function.mysql-result]: Unable to jump to row -1 on MySQL result index 16 in /usr/www/xxx/yyy/zzz/sqlFetch3.php on line 53
It seems to be acting as if the query isn't getting the $id (though it certainly is being generated and seems to reach the form that feeds the query-generator)... But what's got me is the 'index 11' and '16' business. What's that about???
If anyone has any insight on this matter I'd be more than delighted to receive it.
Thanks,
- Paul