zinatnieks Posted November 30, 2007 Report Share Posted November 30, 2007 Kā lai panāk, ka ja tabulas rinda ir tukša to nerāda. Respektīvi pilnās rindas attēlo normāli, bet ja ir tukša tad tā netiek rādīta. Link to comment Share on other sites More sharing options...
Kristabs Posted November 30, 2007 Report Share Posted November 30, 2007 if(trim($dati) != ''){ echo "rinda"; } Link to comment Share on other sites More sharing options...
MC_ Posted November 30, 2007 Report Share Posted November 30, 2007 Ja domaa apstradi veikt pie izvades tad taa while($row = mysql_fetch_array($res, MYSQL_ASSOC)){ if( $row){ var_dump($row); } } Bet labaak buutu datubaazee veikt attieciigu kveeriju, lai tiek izguti tie dati, kurus velesies atradit. $q = "SELECT * FROM mytable WHERE lauks1<>'' AND lauks2 <> '' " vai ari attiecigi lauks1 NOT NULL AND lauks2 NOT NULL Link to comment Share on other sites More sharing options...
Delfins Posted November 30, 2007 Report Share Posted November 30, 2007 MC_ un ja lauks nav obligāts, un nevienam ierakstam tas nav aizpildīts!? Nerādam neko? Imho, tad jau labāk pie outputa: echo (field == "") ? '-' : field; Link to comment Share on other sites More sharing options...
Recommended Posts