Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Hier roep ik de functie aan:
- $testingggg = $database->hopethisworks();
- ?><pre><?php print_r($testingggg) ?> </pre><?php
- Dit is de functie:
- function hopethisworks(){
- $sql = "SELECT * FROM axle WHERE train_id = :train_id";
- $sth = $this->pdo->prepare($sql);
- $sth->bindParam(':train_id', $_GET['train_id'], PDO::PARAM_INT);
- $sth->execute();
- $res['axle'] = $sth->fetch(PDO::FETCH_ASSOC);
- $sql = "SELECT * FROM bogie WHERE train_id = :train_id";
- $sth = $this->pdo->prepare($sql);
- $sth->bindParam(':train_id', $_GET['train_id'], PDO::PARAM_INT);
- $sth->execute();
- $res['bogie'] = $sth->fetch(PDO::FETCH_ASSOC);
- return $res;
- }
- Screen shot komt eraan!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement