torrentz Posted October 12, 2007 Author Report Share Posted October 12, 2007 (edited) $today bija defineets.. MakaTaNaw, ar tavu variantu nekas nenotiek ($count_users neko neraada) bet toties ir pazudusi mysql kljuuda :) Un veel, MakaTaNaw, print_r($result); izvada: Resource id #4 ko tas vareetu noziimeet? :( Edited October 14, 2007 by torrentz Link to comment Share on other sites More sharing options...
torrentz Posted November 6, 2007 Author Report Share Posted November 6, 2007 (edited) tagad es esmu izlēmis category laukumu pievienot weeks tabulai pashaas beigaas ( ALTER TABLE `weeks` CHANGE `category` `category` ENUM( '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10' ) CHARACTER SET cp1251 COLLATE cp1251_general_ci NOT NULL DEFAULT '0' ) bet ir viena probleema: $result=mysql_query("SELECT DISTINCT uid,count,host FROM weeks WHERE host > 0 AND date=$today AND category >= 0 ORDER BY host DESC LIMIT $start,$end"); $count_users_on_page = mysql_num_rows($result); šitais vaicajumus smuki izvada visus dalībniekus kā vajag, bet šis: $kategorija="0"; $result=mysql_query("SELECT DISTINCT uid,count,host FROM weeks WHERE host > 0 AND date=$today AND category=$kategorija ORDER BY host DESC LIMIT $start,$end"); $count_users_on_page = mysql_num_rows($result); neizvada nevienu dalībnieku lai gan visiem category lauks stav noklusēti uz 0. Kur atkal ir ieviesusies kļūda? Edited November 6, 2007 by torrentz Link to comment Share on other sites More sharing options...
andrisp Posted November 6, 2007 Report Share Posted November 6, 2007 Man liekas, ka problēma ir atkal pēdiņu neesamībā. Link to comment Share on other sites More sharing options...
Kristabs Posted November 6, 2007 Report Share Posted November 6, 2007 Ne pa tēmu, bet enum izmantot tā kā esi izdarījis, ir diezgan muļķīgi. Link to comment Share on other sites More sharing options...
torrentz Posted November 6, 2007 Author Report Share Posted November 6, 2007 (edited) ā, var tachu izmantot parasto INT xD Edited November 6, 2007 by torrentz Link to comment Share on other sites More sharing options...
torrentz Posted November 6, 2007 Author Report Share Posted November 6, 2007 kad noņēmu to sūdu ENUM, tad viss aizgaja ka vajag :) Link to comment Share on other sites More sharing options...
andrisp Posted November 6, 2007 Report Share Posted November 6, 2007 (edited) Ko tad vispār liki ? Un ENUM nav sūds. Vienkārši jāmāk izmantot. Un jāizmanto arī attiecīgajās situācijās. Edited November 6, 2007 by andrisp Link to comment Share on other sites More sharing options...
torrentz Posted November 6, 2007 Author Report Share Posted November 6, 2007 (edited) es zinu ka enum nav suuds, es pats esmu suuds. tagad veel viena probleema :) admin panelii izveidoju iespeeju nomainiit kategoriju: $TimeZone="+0"; $New_Time = time() + ($TimeZone * 60 * 60); $today=date("Ymd",$New_Time); $hour = date("H",$New_Time); $day = date("d",$New_Time); @mysql_query("UPDATE weeks SET category=$category WHERE date=$today AND uid=$uid LIMIT 1"); Ja es izveelos visas citas kategorijas, tad viss ir ok, bet ja es izveelos downloads kategoriju (id=0) kategoriju, tad man paraadaas kljuuda: Все поля (кроме "Новый пароль") являются обязательными к заполнению! Заполните их! (173. rindinja) vai ir praatiigi kaa vienu no kategorijas numuriem izmantot 0? kods: http://paste.php.lv/6371 Un ja es veelos izveelos jebkuru no kategorijam, taapat kategorija neatjaunojas Edited November 7, 2007 by torrentz Link to comment Share on other sites More sharing options...
Recommended Posts