hackerman Posted December 10, 2006 Report Share Posted December 10, 2006 (edited) SQL Add.php news.php var.php Kur kļūda?! Itkā datubāzē visu ieraksta, tikai news.php man met erroru! viņam vajadzētu rādīt jaunumus, a viņš man rāda Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\AppServ\www\news\news.php on line 7 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\AppServ\www\news\news.php on line 7 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\news\news.php on line 9 wtf? Un vispār, kur viņš dabūja Access denied for user 'ODBC'@'localhost' (using password: NO) Man tajā config failā bija norādīts savādāk, man nav nekāds tur ODBC! Un Datubāzē visu ierakstīja.. Edited December 11, 2006 by hackerman Link to comment Share on other sites More sharing options...
Val Posted December 10, 2006 Report Share Posted December 10, 2006 tajā news.php nav include 'var.php'; Link to comment Share on other sites More sharing options...
hackerman Posted December 10, 2006 Author Report Share Posted December 10, 2006 ok tnx :) Jocīgi...itkā tas skaitījās manuālis, kur dabūju to skriptu :D Izrādās ka paši nejēdz neko, bet grib iemācīt citam kko :D Link to comment Share on other sites More sharing options...
andrisp Posted December 10, 2006 Report Share Posted December 10, 2006 (edited) Iedod linku uz to manuāli. Gribu uzmest aci. PS. Atradu pats - http://www.trap17.com/index.php/php-news-script_t21920.html , ir vai ne ? Tiešām nebij' norādīts. Edited December 10, 2006 by andrisp Link to comment Share on other sites More sharing options...
hackerman Posted December 10, 2006 Author Report Share Posted December 10, 2006 (edited) Tāaks...Nākat lūdzu atkal palīgā :D "Manuālis" Uzmetat aci arī šim ^_^ Par krāsām neņirdzat, tās liku uz dullo, bet nafig nerāda tos stulbos news?! Laikam būs jāmeklē cits skripts, te kautkāds sviests... Edited December 10, 2006 by hackerman Link to comment Share on other sites More sharing options...
andrisp Posted December 10, 2006 Report Share Posted December 10, 2006 Nerāda jo kaut ko nepareizi es sadarījis. Pārliecinies vai tiešām tie ieraksti, ko pievienoji, atrodas iekš datubāzes. Link to comment Share on other sites More sharing options...
hackerman Posted December 10, 2006 Author Report Share Posted December 10, 2006 (edited) Viss ir iekš datubāzes Edited December 10, 2006 by hackerman Link to comment Share on other sites More sharing options...
Val Posted December 10, 2006 Report Share Posted December 10, 2006 (edited) pieliec echo pirms $query, lai var redzēt, kāds sql uzcepās. tipa: echo $query = "SELECT *," . "DATE_FORMAT(postdate, '%Y-%m-%d') as date " . "FROM news ORDER BY id DESC LIMIT $news_limit"; //1. $result = mysql_query($query); Edited December 10, 2006 by Val Link to comment Share on other sites More sharing options...
hackerman Posted December 10, 2006 Author Report Share Posted December 10, 2006 (edited) Ieliku un nekas nemainās, neskaitot vēl kkādu šitu tur... Moška, kāds var ieteikt kādu pamācību kā taisīt to news pievienošanu? Cutenews un tamlīdzīgi brīnumi nav vajadzīgi, būtu labi, ja būtu šitāds, ejoša skripts :) Edited December 10, 2006 by hackerman Link to comment Share on other sites More sharing options...
andrisp Posted December 10, 2006 Report Share Posted December 10, 2006 (edited) hackerman, a tajā tabulā ieraksti ir ? Kā arī Val tev neprasīja vai kaut kas mainās vai n�“., bet gan lai apskaties kāds query tiek izveidots. Un iekop�“ šeit. Edited December 10, 2006 by andrisp Link to comment Share on other sites More sharing options...
hackerman Posted December 10, 2006 Author Report Share Posted December 10, 2006 (edited) Bilde Blide2 Edited December 10, 2006 by hackerman Link to comment Share on other sites More sharing options...
Val Posted December 10, 2006 Report Share Posted December 10, 2006 (edited) news.php $query = "SELECT *," . "DATE_FORMAT(postdate, '%Y-%m-%d') as date " . "FROM news ORDER BY id DESC LIMIT $news_limit"; //1. $result = mysql_query($query); while ($row = @mysql_fetch_array ($result)) { $title = $row['title']; $date = $row['date']; $content = $row['content']; echo "<p>$title / $date / $content</p>"; }; tālāk... pie add formas šo: <input type=\"text\" name=\"textfield\"> </p> <p>Teksts : <textarea name=\"title\" cols=\"50\" rows=\"10\" id=\"title\"></textarea> samaini arī <input type=\"text\" name=\"title\"> </p> <p>Teksts : <textarea name=\"content\" cols=\"50\" rows=\"10\"></textarea> Edited December 11, 2006 by Val Link to comment Share on other sites More sharing options...
hackerman Posted December 10, 2006 Author Report Share Posted December 10, 2006 Nu jau ir labāk, tnx tev :) tagad rodas nākamie jautājumi :D 1) Kā katru dabūt savā tabulā? 2) Kā viņam pielikt klāt bb kodus? Par BB kodiem es vakar, vai aizvakar tieši atradu pamācību, kā ievienot, tikai tad man nevajadzēja un neieseivoju to linku =/ Link to comment Share on other sites More sharing options...
andrisp Posted December 10, 2006 Report Share Posted December 10, 2006 hackerman, http://www.google.lv/search?hl=lv&q=php+bbcode+tutorial Link to comment Share on other sites More sharing options...
Val Posted December 10, 2006 Report Share Posted December 10, 2006 vispār līks manuālis tev, hackerman, pagadījies... Link to comment Share on other sites More sharing options...
Recommended Posts