POPULARS
 
 
Query error (1052) Column 'discov_num' in order clause is ambiguous
Line: 128
File: /usr/local/www/apache24/data/stelledoppie/web/include/dbi.inc.php
Executing script: /usr/local/www/apache24/data/stelledoppie/web/index2.php
Query: SELECT SQL_CALC_FOUND_ROWS DISTINCT 
		cat_wds.id,
		REPLACE(cat_wds.name,' ',' ') name,cat_wds.cst cst,cat_wds.SAO,
CONCAT_WS(' ',LEFT(cat_wds.coord_arcsec_2000,2),MID(cat_wds.coord_arcsec_2000,3,2),LPAD(ROUND(MID(cat_wds.coord_arcsec_2000,5,5)),2,'0'),
MID(cat_wds.coord_arcsec_2000,10,3),MID(cat_wds.coord_arcsec_2000,13,2),LPAD(ROUND(MID(cat_wds.coord_arcsec_2000,15,4)),2,'0')
) coord,
		cat_wds.discov_num `discov#`,cat_wds.comp,date_last epoch,obs,
CAST(floor(round(calc_pa,0)) AS UNSIGNED INTEGER) pa,ROUND(calc_sep,1) sep,ROUND(mag_pri,2) mag1,ROUND(mag_sec,2) mag2,ROUND(calc_delta_mag,2) d_mag,cat_wds.orbit orb

	,hits FROM popolari LEFT JOIN cat_wds ON popolari.iddoppia = cat_wds.id LEFT JOIN calc_wds_other ON cat_wds.id=calc_wds_other.iddoppia WHERE hits > 200 ORDER BY `discov_num` DESC LIMIT 0,50 LOCK IN SHARE MODE
Backtrace: Array
(
    [0] => Array
        (
            [file] => /usr/local/www/apache24/data/stelledoppie/web/include/funzioni.inc.php
            [line] => 157
            [function] => dbquery
            [args] => Array
                (
                    [0] => SELECT SQL_CALC_FOUND_ROWS DISTINCT 
		cat_wds.id,
		REPLACE(cat_wds.name,' ',' ') name,cat_wds.cst cst,cat_wds.SAO,
CONCAT_WS(' ',LEFT(cat_wds.coord_arcsec_2000,2),MID(cat_wds.coord_arcsec_2000,3,2),LPAD(ROUND(MID(cat_wds.coord_arcsec_2000,5,5)),2,'0'),
MID(cat_wds.coord_arcsec_2000,10,3),MID(cat_wds.coord_arcsec_2000,13,2),LPAD(ROUND(MID(cat_wds.coord_arcsec_2000,15,4)),2,'0')
) coord,
		cat_wds.discov_num `discov#`,cat_wds.comp,date_last epoch,obs,
CAST(floor(round(calc_pa,0)) AS UNSIGNED INTEGER) pa,ROUND(calc_sep,1) sep,ROUND(mag_pri,2) mag1,ROUND(mag_sec,2) mag2,ROUND(calc_delta_mag,2) d_mag,cat_wds.orbit orb

	,hits FROM popolari LEFT JOIN cat_wds ON popolari.iddoppia = cat_wds.id LEFT JOIN calc_wds_other ON cat_wds.id=calc_wds_other.iddoppia WHERE hits > 200 ORDER BY `discov_num` DESC LIMIT 0,50 LOCK IN SHARE MODE
                    [1] => 1
                )

        )

    [1] => Array
        (
            [file] => /usr/local/www/apache24/data/stelledoppie/web/include/lists.inc.php
            [line] => 553
            [function] => visualizza_ng
            [args] => Array
                (
                    [0] => Array
                        (
                            [dati] => SELECT SQL_CALC_FOUND_ROWS DISTINCT 
		cat_wds.id,
		REPLACE(cat_wds.name,' ',' ') name,cat_wds.cst cst,cat_wds.SAO,
CONCAT_WS(' ',LEFT(cat_wds.coord_arcsec_2000,2),MID(cat_wds.coord_arcsec_2000,3,2),LPAD(ROUND(MID(cat_wds.coord_arcsec_2000,5,5)),2,'0'),
MID(cat_wds.coord_arcsec_2000,10,3),MID(cat_wds.coord_arcsec_2000,13,2),LPAD(ROUND(MID(cat_wds.coord_arcsec_2000,15,4)),2,'0')
) coord,
		cat_wds.discov_num `discov#`,cat_wds.comp,date_last epoch,obs,
CAST(floor(round(calc_pa,0)) AS UNSIGNED INTEGER) pa,ROUND(calc_sep,1) sep,ROUND(mag_pri,2) mag1,ROUND(mag_sec,2) mag2,ROUND(calc_delta_mag,2) d_mag,cat_wds.orbit orb

	,hits FROM popolari LEFT JOIN cat_wds ON popolari.iddoppia = cat_wds.id LEFT JOIN calc_wds_other ON cat_wds.id=calc_wds_other.iddoppia WHERE hits > 200
                            [paginazione] => 1
                            [limite] => 
                            [righe] => 50
                            [orderby] => discov#_DESC
                            [orderby_default] => hits DESC
                            [orderby_alt] => Array
                                (
                                    [last_seen] => ultima_visita
                                    [discov#] => discov_num
                                )

                            [trovati] => 1
                            [occulta] => Array
                                (
                                    [0] => id
                                    [1] => hits
                                )

                            [azioni] => Array
                                (
                                    [Show] => index2.php?iddoppia=%%id%%
                                )

                            [classi] => Array
                                (
                                    [cst] => record_c
                                    [SAO] => record_r
                                    [obs] => record_r
                                    [pa] => record_r
                                    [pa_sigma] => record_r
                                    [sep] => record_r
                                    [sep_sigma] => record_r
                                    [mag_pri] => record_r
                                    [mag_sec] => record_r
                                    [mag1] => record_r
                                    [mag2] => record_r
                                    [m1] => record_r
                                    [m2] => record_r
                                    [d_mag] => record_r
                                    [delta_mag] => record_r
                                    [#] => record_r
                                    [rep] => record_r
                                    [orb] => record_c
                                    [hits] => record_r
                                    [shared] => record_c
                                    [listed] => record_c
                                    [locked] => record_c
                                    [hidden] => record_c
                                    [doubles] => record_r
                                    [systems] => record_r
                                )

                        )

                )

        )

    [2] => Array
        (
            [file] => /usr/local/www/apache24/data/stelledoppie/web/include/database.html.php
            [line] => 1787
            [function] => showPopolari
            [args] => Array
                (
                )

        )

    [3] => Array
        (
            [file] => /usr/local/www/apache24/data/stelledoppie/web/include/database.html.php
            [line] => 2125
            [function] => showDati
            [args] => Array
                (
                )

        )

    [4] => Array
        (
            [file] => /usr/local/www/apache24/data/stelledoppie/web/index2.php
            [line] => 287
            [function] => showCorpo
            [args] => Array
                (
                )

        )

)