I want to prepare my data to avoid SQL Injections. So my current working code to show a list of data from a table’s column: I need to use $wpdb->prepare to be sure that my datas are correctly brought from the db. My current progress: This isn’t working. I get a notice: Notice: wpdb::prepare was called incorrectly. The query argument
Tag: wordpress
Select adjacent rows in mysql – but when using alphabetical order of specific column, not numeric order of ID
I have a wordpress install with custom post types where I would like to find the ‘previous’ and ‘next’ custom post type object via mysql. I have read many questions/answers on SO regarding how to achieve this when using the ID. The issue is that a lot of these objects were input at different times, so their numeric ‘id’ order
meta_query, how to search using both relation OR & AND?
Resolved: See answer below. I have a custom post type called BOOKS. It has several custom fields, named: TITLE, AUTHOR, GENRE, RATING. How do I fix my meta_query code below so that only books that have the search word in the custom fields: title, author, genre WITH EXACTLY the rating specified in my search form, gets displayed in the results?
Detecting abuse for post rating system
I am using a wordpress plugin called “GD Star Rating” to allow my users to vote on stories that I post to one of my websites. http://everydayfiction.com/ Recently we have been having a lot of abuse of the system. Stories that have obviously been voted up artificially. “GD Star Rating” creates some detailed logs when a user votes on a