SQL question
-
Hi,
I’ve a little problem with my wordpress site…I have a list of persons, when i click on one person, i want to show some details.
There are two different tables in my database.
In the first table the name is called r_name. In the second table it is called u_name.
But the names are the same!!
Now i want to run this code:$aktPerson = $_GET['r_name']; global $wpdb; $dbname = $wpdb->prefix . 'u_persons'; $rows = $wpdb->get_results("SELECT * from $dbname WHERE u_name = $aktPerson");
I get this error:
[You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'Christian' at line 1] SELECT * from wp_lehrerVisitenkarten WHERE l_name = SMITH Christian
I hope somebody can help me…
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘SQL question’ is closed to new replies.