Pentiums Posted February 17, 2008 Report Share Posted February 17, 2008 Kā ir pareizi izdabūt no DB noteiktu tekstu, piemēram ziņas ja uz DB viņas kārtojas pēc id un ja es rakstu adrešu laukā savā pārlūkā yohohoo.php?id=23 tad kā lai vinjs izvelk no db id 23 zinju un paraada? $sql = dbquery("SELECT * FROM raksti WHERE id='$id'"); sadi laikam nepareizi Link to comment Share on other sites More sharing options...
bubu Posted February 17, 2008 Report Share Posted February 17, 2008 Tā ir ļoti pareizi. Link to comment Share on other sites More sharing options...
Pentiums Posted February 17, 2008 Author Report Share Posted February 17, 2008 kapēc tad neizvelkas? parādas tukša lapa.. bet ja ierakstu tajaa kverijā tiešu id tad parādas Link to comment Share on other sites More sharing options...
Val Posted February 17, 2008 Report Share Posted February 17, 2008 (edited) pirms tam $id = $_GET['id']; http://lv.php.net/mysql_real_escape_string Edited February 17, 2008 by Val Link to comment Share on other sites More sharing options...
Pentiums Posted February 17, 2008 Author Report Share Posted February 17, 2008 paldies... Link to comment Share on other sites More sharing options...
rausis Posted February 17, 2008 Report Share Posted February 17, 2008 pirms tam $id = $_GET['id']; http://lv.php.net/mysql_real_escape_string $id = (int)$_GET['id']; Link to comment Share on other sites More sharing options...
bubu Posted February 17, 2008 Report Share Posted February 17, 2008 kapēc tad neizvelkas? parādas tukša lapa.. Šādos gadījumos irmā lieta, kas ir jādara ir jāuzliek error_reporting par E_ALL un display_errors = true. Link to comment Share on other sites More sharing options...
Recommended Posts