MySQL Forums
Forum List  »  Newbie

Re: Warning: mysql_fetch_array() expects parameter 1 to be resource
Posted by: Barry Galbraith
Date: November 29, 2010 04:58PM

Your query is SELECTing two studID, two sessionIDs, and two classroomIDs, but your logic to write them to your page makes no didtinction.

If you really require both to be selected, you should alias them to unique names.

SELECT e.studID student_id, e.courseNum, e.facID, e.sessionID e_sessionID, e.classroomID e_classroomID .......

Then refer to your alias when you write the value to the page.

You should also include the "or die(mysql_error())" clause on your query to catch errors. Your php may not be getting the result you think.

Good luck,
Barry.

Options: ReplyQuote


Subject
Written By
Posted
November 27, 2010 01:15PM
Re: Warning: mysql_fetch_array() expects parameter 1 to be resource
November 29, 2010 04:58PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.