Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $HOST='localhost';
- $USER=$PASSWORD='root';
- $BD='u0165478_default';
- $db=new PDO("mysql:host=$HOST;dbname=$BD", $USER, $PASSWORD);
- $code=$db->prepare('SET NAMES utf8');
- $code->execute();
- $SQL='SELECT id FROM post WHERE filter=1 ORDER BY id DESC LIMIT 0,10';
- $sth=$db->prepare($SQL);
- $sth->execute();
- $ids=$sth->fetchAll();
- print_r($ids);
- ?>
Add Comment
Please, Sign In to add comment