Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $hostDb='mysql:host=127.0.0.1;port=3306;dbname=oxwall';
- $user='root';
- $password='yourmom';
- $DBH = new PDO($hostDb, $user, $password);
- $QTH = $DBH -> prepare( "SELECT id,username,password FROM ow_base_user ORDER BY id DESC
- LIMIT 1");
- $QTH -> execute();
- $qea = $QTH -> fetchAll();
- //$qqw = $qea ["password"];
- //$qer = $qea ["username"];
- $ETH = $DBH -> prepare( "SELECT userId FROM ow_friends_friendship ORDER BY id
- DESC LIMIT 1");
- $ETH -> execute();
- $aqs = $ETH -> fetch();
- $WTH = $DBH -> prepare( "SELECT id FROM ow_base_user ORDER BY id DESC LIMIT 1");
- $WTH -> execute();
- $WTH -> execute();
- $zes = $WTH -> fetch();
- $huh = $aqs ["userId"];
- $nope = $zes ["id"];
- if ( $huh == $nope ) {
- echo "done.";
- } else {
- echo "Adding user";
- foreach ($qea as $row) {
- $etc = exec("cut -d: -f1 /etc/passwd | grep -x " . chr(34) . $row["username"] .
- chr(34));
- $XTH = $DBH -> prepare( "SELECT id,username FROM ow_base_user WHERE username =
- :parameter" );
- $XTH->bindParam(':parameter', $row["username"], PDO::PARAM_STR);
- $XTH -> execute();
- $result = $XTH -> fetch();
- $user = $result ["id"];
- $HTH = $DBH -> prepare( "SELECT id FROM ow_base_user" );
- $HTH -> execute();
- $zea = $HTH -> fetchAll();
- foreach ($zea as $blah) {
- $everybody = $blah["id"];
- $status = "active";
- $stamp = exec("date +%s");
- $viewed = "1";
- $active = "1";
- $notificationSent = "0";
- $ETH = $DBH -> prepare( "SELECT id FROM ow_friends_friendship ORDER BY id LIMIT
- 1");
- $ETH -> execute();
- $ETH -> execute();
- $aqs = $ETH -> fetch();
- $huh = $aqs ["id"];
- /* $huh += 1;*/
- /*$iUniqueNumber = crc32(uniqid());*/
- $my_unique_id = "DEFAULT";
- var_dump($huh);
- $ZTH = $DBH -> prepare("INSERT INTO ow_friends_friendship (id, userId, friendId,
- status, timeStamp, viewed, active, notificationSent)
- VALUES (:id, :userId, :friendId, :status, :timeStamp, :viewed, :active, :whatever)");
- $ZTH->bindParam(':id', $my_unique_id, PDO::PARAM_STR);
- $ZTH->bindParam(':userId', $user, PDO::PARAM_STR);
- $ZTH->bindParam(':friendId', $everybody, PDO::PARAM_STR);
- $ZTH->bindParam(':status', $status, PDO::PARAM_STR);
- $ZTH->bindParam(':timeStamp', $stamp, PDO::PARAM_STR);
- $ZTH->bindParam(':viewed', $viewed, PDO::PARAM_STR);
- $ZTH->bindParam(':active', $active, PDO::PARAM_STR);
- $ZTH->bindParam(':whatever', $notificationSent, PDO::PARAM_STR);
- $ZTH -> execute();
- $result = $ZTH -> fetch();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement