I have a samll problem related to a specific query. It creates following error. Unknown column 'attendance_state.state' in 'field list'
$query="SELECT attendance_state.state,attendance_state.state_id from attendance_state inner join attendance on attendance_state.state_id=attendance.state_id where attendance.admission_no='".$admission_id[$i]."' and attendance.date='$date'";
$result=mysql_query($query) or die (mysql_error());
The table related to the query looks like this. "state_id" is set as auto increment field.