Does anyone see anything wrong with this code?
Posted: Sat Feb 26, 2011 10:10 am
Does anyone see anything wrong with this code?
It returns:
In this case, the value in the DB is 993 and the field type is bigint
Code: Select all
<?php
$mysqli = new mysqli("localhost", "db", "pw", "user");
$query = "SELECT ID FROM wp_posts WHERE post_title = 'some post'";
$id = mysqli_query($mysqli, $query);
echo var_dump($id);
?>Code: Select all
object(mysqli_result)#2 (0) { }