RE: re-using a results set
From: Scott Swaim [mailto:[EMAIL PROTECTED] Thank you Chris for that answer. I did not know if it was a mysql problem or php problem. Again I apologize (especially to Mike Johsnon) for the multiple request. I was getting a return error on the list and I thought it was a configuration error on my part. I did not mean to upset anyone. Thank you again for the answer and I will try to have better netiquette in the future. Ahh. I, in turn, apologize for my message. Quite often you see someone on here who, if a reply isn't received within an hour or two, will simply resend their message again and again until someone boils over. Sorry about my hasty reply. :) -- Mike Johnson Web Developer Smarter Living, Inc. phone (617) 886-5539 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: re-using a results set
This is a PHP question, not MySQL. http://www.php.net/mysql_data_seek -Original Message- From: Scott Swaim [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 21, 2004 2:47 PM To: Mysql Subject: re-using a results set I have a form that does the following ? while ($speaker = mysql_fetch_object($qid_speaker)) { ? option value=? pv($speaker-first_name) ? ? pv($speaker-last_name) ? ? pv($speaker-first_name) ? ? pv($speaker-last_name) ? ? } ? /select $qid_speaker = db_query(SELECT first_name, last_name FROM people WHERE speaker = 'Y' ORDER BY last_name); I am using this in a form select drop down box. What I need to do is reuse this results set in another drop down box. but I can not figure out how to do this. If I use the mysql_free-result($qid_speaker) and then try to do the query again I get a mysql_fetch_object(): 12 is not a valid MYSQL result resource. TIA Scott Swaim Quality Corps, Inc. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: re-using a results set
From: Scott Swaim [mailto:[EMAIL PROTECTED] I have a form that does the following ? while ($speaker = mysql_fetch_object($qid_speaker)) { ? option value=? pv($speaker-first_name) ? ? pv($speaker-last_name) ? ? pv($speaker-first_name) ? ? pv($speaker-last_name) ? ? } ? /select $qid_speaker = db_query(SELECT first_name, last_name FROM people WHERE speaker = 'Y' ORDER BY last_name); I am using this in a form select drop down box. What I need to do is reuse this results set in another drop down box. but I can not figure out how to do this. If I use the mysql_free-result($qid_speaker) and then try to do the query again I get a mysql_fetch_object(): 12 is not a valid MYSQL result resource. You've now posted this four times today. Was that on purpose? I can only assume so, as some people have absolutely no sense of netiquette whatsoever. Why, you ask, has no one replied with the infinite wisdom to solve your problem? I, for one, haven't because your original email is at least vaguely unintelligible. Have I asked for more information so that I might be more helpful? No, I've been busy. Posting over and over and over again, though, seems to have worked, so readers, take note -- if at first you don't succeed, try, try again until you annoy someone into listening. *sigh* That said, sir, could you possibly provide more details for your situation? Your code is a bit jumbled. We have no idea what pv() does, for instance. Nor db_query(). These are not standard PHP functions, so you'll have to forgive us if we're all a bit clueless and unwilling to help. -- Mike Johnson Web Developer Smarter Living, Inc. phone (617) 886-5539 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: re-using a results set
Thank you Chris for that answer. I did not know if it was a mysql problem or php problem. Again I apologize (especially to Mike Johsnon) for the multiple request. I was getting a return error on the list and I thought it was a configuration error on my part. I did not mean to upset anyone. Thank you again for the answer and I will try to have better netiquette in the future. - Original Message - From: Chris [EMAIL PROTECTED] To: Mysql [EMAIL PROTECTED] Sent: Wednesday, April 21, 2004 4:54 PM Subject: RE: re-using a results set This is a PHP question, not MySQL. http://www.php.net/mysql_data_seek -Original Message- From: Scott Swaim [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 21, 2004 2:47 PM To: Mysql Subject: re-using a results set I have a form that does the following ? while ($speaker = mysql_fetch_object($qid_speaker)) { ? option value=? pv($speaker-first_name) ? ? pv($speaker-last_name) ? ? pv($speaker-first_name) ? ? pv($speaker-last_name) ? ? } ? /select $qid_speaker = db_query(SELECT first_name, last_name FROM people WHERE speaker = 'Y' ORDER BY last_name); I am using this in a form select drop down box. What I need to do is reuse this results set in another drop down box. but I can not figure out how to do this. If I use the mysql_free-result($qid_speaker) and then try to do the query again I get a mysql_fetch_object(): 12 is not a valid MYSQL result resource. TIA Scott Swaim Quality Corps, Inc. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]