INSERT

Get Auto ID Of New Record The insert_id() function returns the auto generated id used in the latest querywith a column having the AUTO_INCREMENT attribute.

Read More

SELECT

Are any results returned Loop through all row results Get single result Is a result returned? Select From Row + Value Array Read SQL Server Time

Read More

UPDATE

Simple Update If you need to know how many rows were affected Update From Row + Value Array

Read More

$wpdb->prepare

It’s best practice to always use ->prepare to prevent against SQL injection attacks via user supplied data. This is simply a string checker function, string in > string out with variables added as it works. You only need to use it for values you have obtained from somewhere else. You should NOT use it for […]

Read More