Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Streda, 25. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  Using distinct

phpMyEdit General     Using distinct
Odoslať novú tému   Odpovedať na tému    
 
d34d     Založený: 19.04.2004   Príspevky: 3  
Príspevok Zaslal: 2004-04-19 17:44
Návrat hore  Odpovedať s citátom     

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     Založený: 17.06.2003   Príspevky: 537   Bydlisko: Slovakia
Príspevok Zaslal: 2004-04-19 18:15
Návrat hore  Odpovedať s citátom     

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

$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     Založený: 19.04.2004   Príspevky: 3  
Príspevok Zaslal: 2004-04-19 19:33
Návrat hore  Odpovedať s citátom     

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     Založený: 17.06.2003   Príspevky: 537   Bydlisko: Slovakia
Príspevok Zaslal: 2004-04-19 21:00
Návrat hore  Odpovedať s citátom     

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     Založený: 19.04.2004   Príspevky: 3  
Príspevok Zaslal: 2004-04-19 21:17
Návrat hore  Odpovedať s citátom     

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     Založený: 17.06.2003   Príspevky: 537   Bydlisko: Slovakia
Príspevok Zaslal: 2004-04-23 13:34
Návrat hore  Odpovedať s citátom     

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

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov