Click here to Skip to main content
15,793,535 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
GeneralRe: For Loop does not work Pin
Firo Atrum Ventus28-May-11 1:02
Firo Atrum Ventus28-May-11 1:02 
GeneralRe: For Loop does not work Pin
Dwayner7928-May-11 13:31
Dwayner7928-May-11 13:31 
QuestionData Mapping in PHP Pin
grmihel225-May-11 4:47
grmihel225-May-11 4:47 
AnswerRe: Data Mapping in PHP Pin
cjoki25-May-11 6:56
cjoki25-May-11 6:56 
GeneralRe: Data Mapping in PHP Pin
grmihel225-May-11 22:54
grmihel225-May-11 22:54 
GeneralRe: Data Mapping in PHP Pin
cjoki26-May-11 10:43
cjoki26-May-11 10:43 
GeneralIphone Development Training Courses Pin
karnti45452-Jun-12 0:18
karnti45452-Jun-12 0:18 
QuestionMySQL & PHP query: using SELECT * and DISTINCT Pin
whatsa19-May-11 15:25
whatsa19-May-11 15:25 
Hey CodeProject!

So I'm trying to make a query in PHP and mySQL..

One of the database tables has a value I want to SELECT DISTINCT while selecting everything else regularly with an asterisk (*).

Example:

<br />
<br />
$model_select = "select DISTINCT model FROM models where shw=1 ORDER BY modelid";<br />
$model_select = "select * FROM models where shw=1 ORDER BY modelid";<br />
<br />


Is there a way I can do both DISTINCT and * in the same query command? Or is there a way around this without making 2 queries?

It would be great if I could 'cause I'm using the mysql_fetch_array thing.

Thanks.

-Paul
AnswerRe: MySQL & PHP query: using SELECT * and DISTINCT Pin
Luc Pattyn19-May-11 16:31
sitebuilderLuc Pattyn19-May-11 16:31 
AnswerRe: MySQL & PHP query: using SELECT * and DISTINCT Pin
urtrivedi19-May-11 18:58
urtrivedi19-May-11 18:58 
AnswerRe: MySQL & PHP query: using SELECT * and DISTINCT Pin
cjoki25-May-11 6:41
cjoki25-May-11 6:41 
Questionecho not working Pin
Steve Harp19-May-11 7:05
Steve Harp19-May-11 7:05 
AnswerRe: echo not working Pin
Graham Breach19-May-11 7:25
Graham Breach19-May-11 7:25 
GeneralRe: echo not working Pin
Steve Harp19-May-11 10:50
Steve Harp19-May-11 10:50 
QuestionE-mail tracking in PHP Pin
ubaidur19-May-11 3:30
ubaidur19-May-11 3:30 
AnswerRe: E-mail tracking in PHP Pin
Gerben Jongerius19-May-11 4:47
Gerben Jongerius19-May-11 4:47 
GeneralRe: E-mail tracking in PHP Pin
ubaidur19-May-11 22:06
ubaidur19-May-11 22:06 
AnswerRe: E-mail tracking in PHP Pin
cjoki25-May-11 6:32
cjoki25-May-11 6:32 
QuestionHow to Compile a .PHP File Pin
Sajju201114-May-11 10:06
Sajju201114-May-11 10:06 
AnswerRe: How to Compile a .PHP File Pin
Luc Pattyn14-May-11 12:09
sitebuilderLuc Pattyn14-May-11 12:09 
QuestionBLDMAKE ERROR: Can't find any RVCT installation. Pin
Raj Aryan 100110-May-11 6:03
Raj Aryan 100110-May-11 6:03 
AnswerRe: BLDMAKE ERROR: Can't find any RVCT installation. Pin
Uilleam23-Jul-11 16:17
Uilleam23-Jul-11 16:17 
QuestionExecuting PHP script without leaving the page Pin
AmbiguousName3-May-11 6:03
AmbiguousName3-May-11 6:03 
AnswerRe: Executing PHP script without leaving the page Pin
enhzflep3-May-11 6:09
enhzflep3-May-11 6:09 
AnswerRe: Executing PHP script without leaving the page PinPopular
enhzflep3-May-11 7:39
enhzflep3-May-11 7:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.