Tagged Questions
0
votes
2answers
50 views
Really simple query giving error in SQL syntax
I'm sure this is a simple oversight but I cannot seem to narrow it down:
global $wpdb;
$tablename = $wpdb->prefix . "icrm_folders";
$sql = $wpdb->prepare( "SELECT * FROM %s", $tablename );
...
0
votes
0answers
45 views
Custom Wordpress Meta Query
I have a post type (course) that has some meta data associated with it, namely the following two:
City and State
The two pieces of data above are stored in the postmeta table, with meta_keys ...
0
votes
1answer
2k views
Retrieving custom fields with $wpdb->get_results
I'm trying to use $wpdb->get_results to retrieve an array of all posts including custom fields. I can retrieve the meta_key and meta_value columns like this:
[meta_key] => state [meta_value] ...
3
votes
2answers
443 views
Display only certain posts based on visitor's country?
Is it theoretically possible to have the following feature?
Each post has a country code. When a visitor comes in, the system will determine the visitor's country code. Then when the page renders, ...
4
votes
1answer
2k views
Making my plugin multi-site compatible
I want my plugin to be installed on each blog and create database tables per blog. I have this code:
register_activation_hook( __FILE__, 'install1' );
function install1() {
global $wpdb;
if ...
2
votes
2answers
505 views
How to add SQL file with PHP to WordPress database [closed]
I have SQL file with US zip codes (over 41000 lines of code). I want make a plugin that inserts this SQL file into WP database so user can do a search by zip codes. I want to insert SQL with PHP ...
11
votes
3answers
311 views
What are the common security flaws I need to look for? [closed]
As a wannabe WP plugin developper, what are the main security flaws/holes I should look for?
I'm about to create a new plugin with a configuration panel (ie input fields and stuff). What should I be ...