Guest User

Untitled

a guest
Feb 27th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. <?php
  2. $HOST='localhost';
  3. $USER=$PASSWORD='root';
  4. $BD='u0165478_default';
  5. $db=new PDO("mysql:host=$HOST;dbname=$BD", $USER, $PASSWORD);
  6. $code=$db->prepare('SET NAMES utf8');
  7. $code->execute();
  8. $SQL='SELECT id FROM post WHERE filter=1 ORDER BY id DESC LIMIT 0,10';
  9. $sth=$db->prepare($SQL);
  10. $sth->execute();
  11. $ids=$sth->fetchAll();
  12. print_r($ids);
  13. ?>
Add Comment
Please, Sign In to add comment