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

phpMyEdit Configuration     LIMIT command
Odoslať novú tému   Odpovedať na tému    
 
msavi     Založený: 26.01.2010   Príspevky: 10  
Príspevok Zaslal: 2010-07-29 13:20
Návrat hore  Odpovedať s citátom     

i have a joined table. in table one i have a list of users. in table 2 i have their appointment. when i join the tables i get all the users' appointment. i want just the last appointment for each user. i am trying to use the limit =>'1' and limit =>'0'1' but it does not work.

any ideas?

thanks-

 
doug     Založený: 10.02.2003   Príspevky: 1013   Bydlisko: Denver, Colorado (USA)
Príspevok Zaslal: 2010-07-29 14:13
Návrat hore  Odpovedať s citátom     

How about filters MAX(date_field)?

I've never tried to use LIMIT in this context, not sure if it would work or not. Post your code (maybe you included LIMIT incorrectly within the array).

 
msavi     Založený: 26.01.2010   Príspevky: 10  
Príspevok Zaslal: 2010-07-29 14:30
Návrat hore  Odpovedať s citátom     

no luck - tried this

$opts['fdd']['dummy'] = array (

'name' => 'Lasta',
//'options' => 'LV',
'colattrs' => 'style="color:blue;background-color:transparent"',
'input' => 'V',
'select' => ' T',
'sort' => true,
//'datemask' => 'r',

'values' => Array( // API for currently making a join in PME.
'table' => 'pneialiyot', // the table to which we're joining
'column' => 'id', // the key field in the joined table
'description' => 'date', // the desired column in the joined table
'join' => '$main_table.member = $join_table.member AND $main_table.firstname = $join_table.name ' ,
//'filters' =>'MAX(date)',
),

'sql' =>'PMEjoin7.date',
'filters' => 'max(PMEjoin7.date)',

 
doug     Založený: 10.02.2003   Príspevky: 1013   Bydlisko: Denver, Colorado (USA)
Príspevok Zaslal: 2010-07-29 14:47
Návrat hore  Odpovedať s citátom     

Can't think of any answers. The field name 'date' may have issues with ambiguity. I thought 'date' was a reserved word but I don't find 'date' in my bad words cheatsheet.

 
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