• Skip to primary navigation
  • Skip to main content
Sal Ferrarello
  • About Sal Ferrarello
  • Speaking
  • Connect
    Mastodon GitHub Twitter (inactive)
You are here: Home / Archives for MySQL

MySQL

Syringe in front of medical vials.

WordPress and SQL Injection

Last updated on February 28, 2020 by Sal Ferrarello

An SQL injection vulnerability occurs when you use a variable in your SQL statement and someone uses the variable to add unexpected code. In this article, we’ll look at how this occurs and how to prevent it.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Programming Tagged With: database, MySQL, WordPress

MySQL Query for Multiple Strings with LIKE

Last updated on April 24, 2020 by Sal Ferrarello

I recently learned that doing a MySQL “LIKE” with multiple strings separated with ‘%’ behaves the same as multiple “LIKE” statements.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Programming Tagged With: MySQL

MySQL Paging Lots of Results

Last updated on May 8, 2018 by Sal Ferrarello

I’ve recently moved to using the terminal program alacritty, which does not natively do paging. This is not generally a problem since I can pipe results to less. $ ls dir-w-lots-of-files | less However, I found myself working in command line MySQL and I got LOTS of results but could not page back. It turns […]

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft Tagged With: command line, MySQL

Screenshot of wp find-content command being run to find a specific Gravity Form shortcode

Search WordPress Post and Post Meta

Last updated on January 11, 2018 by Sal Ferrarello

Recently, I had to find instances of where specific Gravity Forms were being used. This came with multiple challenges. Challenges Searching for gravityform id=”7″ returns results for just gravityform (i.e. too many results) If the gravity form appears in post meta (rather than the primary content), it is excluded (i.e. missing results) SQL Solution Find […]

Filed Under: Programming, Solution Tagged With: command line, MySQL, WordPress, wp-cli

WordPress Unknown collation utf8mb4_unicode_520_ci

Last updated on December 19, 2016 by Sal Ferrarello

Recently I had to move a WordPress database from a site running an old version of MySQL, specifically 5.6.33, and it lead to some problems. First Problem: Unknown collation utf8mb4_unicode_520_ci #1273 – Unknown collation: ‘utf8mb4_unicode_520_ci’ This was the first error message I received when trying to import the database. It turns out this can be […]

Filed Under: Programming Tagged With: MySQL

Copyright © 2023 · Bootstrap4 Genesis on Genesis Framework · WordPress · Log in