Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Making preset class variables available to functions
- <?php
- Class DBcalls {
- private static $dbconn = pg_connect("host=localhost port=5432 dbname=dbnamehere user=usernamejere password=1234567");
- function adbcallfunc($called){
- $result = pg_prepare($dbconn, "adbcallfunc", 'select somecolumn from table where somecolumn = $1');
- $result = pg_execute($dbconn, "adbcallfunc", array($called));
- $GetResult = @pg_fetch_array($result);
- $key = 'othercolumn';
- $wantedresults = $GetResult[$key];
- return $totalviews;
- }
- }
- $query = new DBcalls;
- $query = $query->IPViewCount('foo');
- echo $query;
Add Comment
Please, Sign In to add comment