The code below gives me the following error: Warning: mysqli_error() expects exactly 1 parameter, 0 given in /home/efarrell/public_html/wp-content/plugins/wp-members-pages/members_page.php on line 46
Code: Select all
$mysqli = new mysqli("localhost", "db", "pw", "user");
$query = "SELECT * FROM wp_network_members WHERE f_name = $member[0] AND l_name = $member[1]";
$result = mysqli_query($mysqli, $query) or die(mysqli_error());
$member_data = mysqli_fetch_row($result);
The value for $member is Array ( [0] => Liz [1] => Barlowe ) and there is a row in the DB with the correct first and last name in the correct fields.
Any idea what is wrong here?