I want to a mysql query that matches a page title. Not sure of a better way to accomplish this task, but I am stuck.
This is my basic test code.
<?php
$page_title = wp_title('');
echo $page_title;
$test = $wpdb->get_results("SELECT * FROM $wpdb->park_data WHERE park_name = '"$page_title"' ") or die(mysql_error());
$row = mysql_fetch_array($test);
echo $row['park_name'];
?>
I keep getting a error on the query. If I just echo wp_title('');, no problem, prints.
Can anyone see what I am doing wrong?