php-general Digest 12 Feb 2011 19:57:06 -0000 Issue 7178

2011-02-12 Thread php-general-digest-help
php-general Digest 12 Feb 2011 19:57:06 - Issue 7178 Topics (messages 311253 through 311255): using BOTH GET and POST in the same page. 311253 by: Ashim Kapoor 311254 by: Jim Lucas 311255 by: Nathan Rixham Administrivia: To subscribe to the digest, e-mail:

Re: [PHP] using BOTH GET and POST in the same page.

2011-02-12 Thread Jim Lucas
On 2/11/2011 9:23 PM, Ashim Kapoor wrote: Dear All, I am reading PHP5 and MySQL Bible. Chapter 7 of the book says that PHP can use GET and POST in the SAME page! Also it says that we can use the SAME variables in GET and POST variable sets and that conflict resolution is done by variable_order

[PHP] Re: using BOTH GET and POST in the same page.

2011-02-12 Thread Nathan Rixham
Ashim Kapoor wrote: Dear All, I am reading PHP5 and MySQL Bible. Chapter 7 of the book says that PHP can use GET and POST in the SAME page! Also it says that we can use the SAME variables in GET and POST variable sets and that conflict resolution is done by variable_order option in php.ini Can

[PHP] Re: using BOTH GET and POST in the same page.

2011-02-12 Thread Nathan Rixham
Ashim Kapoor wrote: Dear All, I am reading PHP5 and MySQL Bible. Chapter 7 of the book says that PHP can use GET and POST in the SAME page! Also it says that we can use the SAME variables in GET and POST variable sets and that conflict resolution is done by variable_order option in php.ini Can

[PHP] Simplifying MySql queries

2011-02-12 Thread Andre Polykanine
Hi all, I'm using in my PHP script the following four MySql queries: $q1=mysql_query(SELECT *FROM`CandidateQuestions`WHERE `Category`='1' ORDER BY RAND() LIMIT 1); $q2=mysql_query(SELECT *FROM`CandidateQuestions`WHERE `Category`='2' ORDER BY RAND() LIMIT 1);

Re: [PHP] Simplifying MySql queries

2011-02-12 Thread Thijs Lensselink
On 02/12/2011 09:40 PM, Andre Polykanine wrote: Hi all, I'm using in my PHP script the following four MySql queries: $q1=mysql_query(SELECT *FROM`CandidateQuestions`WHERE `Category`='1' ORDER BY RAND() LIMIT 1); $q2=mysql_query(SELECT *FROM`CandidateQuestions`

Re: [PHP] Simplifying MySql queries

2011-02-12 Thread Simon J Welsh
On 13/02/2011, at 9:40 AM, Andre Polykanine wrote: Hi all, I'm using in my PHP script the following four MySql queries: $q1=mysql_query(SELECT *FROM`CandidateQuestions`WHERE `Category`='1' ORDER BY RAND() LIMIT 1); $q2=mysql_query(SELECT *FROM`CandidateQuestions`

[PHP] Re: Simplifying MySql queries

2011-02-12 Thread Nathan Rixham
Andre Polykanine wrote: and here goes the question: is there a way to make these four in one so strictly one random question is selected from all of the four categories? SELECT * FROM `CandidateQuestions` WHERE `Category` IN(1,2,3,4) ORDER BY RAND() LIMIT 4 note the limit 4, you'll

Re: [PHP] Simplifying MySql queries

2011-02-12 Thread Jim Lucas
On 2/12/2011 12:40 PM, Andre Polykanine wrote: Hi all, I'm using in my PHP script the following four MySql queries: $q1=mysql_query(SELECT *FROM`CandidateQuestions`WHERE `Category`='1' ORDER BY RAND() LIMIT 1); $q2=mysql_query(SELECT *FROM`CandidateQuestions`WHERE