Setting variable from external database

I am trying to set a variable from an external database. The SQL gives me the result I am expecting when I run in phpmyadmin. When I try to use $handler and write to another database, I don’t get the results I expect.

$handler_key = get_var($wpdb2->query(“SELECT key FROM handlers WHERE email = $email”, OBJECT));

Read more here:: Setting variable from external database

Leave a Reply

Your email address will not be published. Required fields are marked *