I am finishing up a project for this Independent Study and it is driving me nuts! I am changing code from ASP to PHP and I am at a point where the SQL works. I have tried it under phpmyadmin. It returns what it should. The problem I am getting is with the mysql_result part. It keeps returning errors like this:
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /var/www/html/general/faculty_class.php on line 88
This is the code that I have. Any suggestions on how to get this thing to start working?
Thanks!
$rs1 = mysql_query("select f.fid, f.lastname, f.firstname, fc.fc_comments, f.f_comments, fc.fc_web_addr, f.f_web_addr, f.f_email, fc.student_pre_addr, fc.student_post_addr, fc.num_per_row, fc.picture_size from gbook_Faculty_class fc, gbook_faculty f where fc.class_code='$classcode_session' and fc.fac_id = f.fid");
// $rs1 is of type "adodb.recordset"
print $rs1;
//$rs1 = mysql_query=($rs1);
//$sql="select * from gbook_announcements where class_code = '$classcode_session' order by date_post desc, order1";
// $rs3 is of type "adodb.recordset"
//$rs3 = mysql_query($sql);
//static
print mysql_result($rs1,0,"num_per_row");
$numperrow1=mysql_result($rs1,0,"num_per_row");
print $numperrow1;