Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, November 11, 2026
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  Using distinct

phpMyEdit General     Using distinct
Post new topic   Reply to topic    
 
d34d     Joined: 19 Apr 2004   Posts: 3  
Post Posted: 2004-04-19 17:44
Back to top  Reply with quote     

I have a simple mysql table built for simple low risk profiling, it includes usernames, and then profiles. However I have a Leaders and then Followers all in the same table, the Leaders use some columns that Followers dont.

How would I be able to get this to distinctly just show the Leader data. I got it to where it will show the opt lists I want, but it will show white space because of the select * query. I needa select distinct.

Sorry if this is a newbie question, but I'm new to this myself.

 
michal     Joined: 17 Jun 2003   Posts: 537   Location: Slovakia
Post Posted: 2004-04-19 18:15
Back to top  Reply with quote     

well the easiest way is to have two files, separate for leaders and followers.
for leaders
Code:

$opts['filters'] = "type = 'leaders'";

(or how you tell difference between leader and follower)
and standard configuration of $opts['fdd'].

for followers: it will be similar.

make sure that adding is correct in both leaders and followers.

 
d34d     Joined: 19 Apr 2004   Posts: 3  
Post Posted: 2004-04-19 19:33
Back to top  Reply with quote     

perhaps I'm just not explaining myself, pardon my newness.

I want the phpmyedit to produce this

sql=("select distinct * from info where leader='$var'");

 
michal     Joined: 17 Jun 2003   Posts: 537   Location: Slovakia
Post Posted: 2004-04-19 21:00
Back to top  Reply with quote     

pme is doing 'select col1 as col1, ... from table where ..'
it's not doing '*'.

and to make 'select distinct ..' ( not 'select ..') is possible only (afaik) through hacking the main class.

btw, what does 'distinct' do ? (my sql class was a long time ago ...)

 
d34d     Joined: 19 Apr 2004   Posts: 3  
Post Posted: 2004-04-19 21:17
Back to top  Reply with quote     

Never mind I finally figured it out. I'd been working with phpmyedit for a few days and hadn't been able to accomplish much. Being a very novice programmer I just had to figure out how to turn my mysql queries into what it wanted.

The only thing I'm having issues with now is I've found that $opts['filters'] justifies your where statement. I cant figure out what would justify your select statement.

 
michal     Joined: 17 Jun 2003   Posts: 537   Location: Slovakia
Post Posted: 2004-04-23 13:34
Back to top  Reply with quote     

you modify you $opts['fdd'] which says which fields are to be displayed. delete entries which you don't want to show.

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy