WPDB and PHP
-
I’m trying to utilize some existing queries from an old site to a SQL database via PHP and just trying to figure out how to change the PHP code correctly.
My old method was I had a “Connection” file that contained needed variables and then called the database table via:
$select=$_GET[‘id’];
mysql_select_db($database_Dbase, $Dbase);
$query_Break = “SELECT * FROM TB WHERE TB.id=’$select'”;
$Break = mysql_query($query_Break, $Dbase) or die(mysql_error());
$row_Break = mysql_fetch_assoc($Break);
$totalRows_Break = mysql_num_rows($Break);Apparently, I should be using the wpdb, but not quite sure how it will change my calls.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘WPDB and PHP’ is closed to new replies.