Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. Warning: mysqli_query() expects at least 2 parameters, 1 given in /home/canaljog/public_html/home/pages/principal.php on line 21
  2.  
  3. $pdo = new PDO("mysql:host=localhost;dbname=canaljog_website", "canaljog_sa", "tcmm@0105");
  4.  
  5. <?php
  6.  
  7. $SQL_F = mysql_query("SELECT * FROM categoria WHERE nome_categoria='slider'");
  8.  
  9. while($ft = mysql_fetch_array($SQL_F)){
  10. $id_ft = $ft['id_categoria'];
  11. }
  12.  
  13. $SQL_FN = mysql_query("SELECT * FROM noticias WHERE categoria='$id_ft' ORDER BY id_noticia DESC LIMIT 1");
  14. while($ftn = mysql_fetch_array($SQL_FN)){
  15.  
  16. ?>
  17.  
  18.  
  19. <div class="item active">
  20. <a href="pages/noticia.php?id=<?php echo $ftn['id_noticia']; ?>">
  21.  
  22.  
  23. <img src="adm/imagens/imgnoticia/<?php echo $ftn['imagem'];?>" alt="<?php echo $ftn['titulo']; ?>" />
  24.  
  25. </a>
  26.  
  27. <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement