Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include "dbconf.php";
- function create_conn()
- {
- //global $wpdb; mindegy hogy kivan-e kommentelve a hiba ua.
- $mydb = new wpdb($dbuser,$dbpass,$dbname,$dbhost);
- //echo "<font color='yellow'><center>DB CONNECTION</center></font>";
- $rows = $mydb->get_results("select nev from gems");
- echo "<ul>";
- foreach ($rows as $obj)
- {
- echo "<li>" .$obj->nev. "</li>";
- }
- echo "</ul>";
- $mydb->show_errors();
- }
- add_action('init','create_conn');
Advertisement
Add Comment
Please, Sign In to add comment