> Here are my variables when I reveal them, I am picking up the right > adminID I can't figure out why it's returning random orders though: > $query "SELECT admin.AdminID, workorders.AdminID FROM admin, > workorders WHERE admin.UserName = 'tmiller' " > $result "Resource id #5" > $row > key value > [WorkOrderID] "44" > [AdminID] "7" > > $SortBy "WorkOrderID DESC" > $Page "2" > $PerPage "30" > $StartPage "30" > $sql "SELECT workorders.WorkOrderID, workorders.AdminID, > admin.AdminID FROM workorders, admin WHERE workorders.AdminID = > admin.AdminID " > $Total "3" > > Because your queries are hosed. You want to populate $row with what? If you want all the fields in workorders, then this works great: SELECT * FROM workorders WHERE AdminID = 7 -Shawn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php