OpenLampTech issue #58
SQL trim() function | A look at Drupal 10 | PHP array_merge() | MySQL ChatGPT for DBA. Welcome to this week's OpenLampTech developer newsletter!
I’m so grateful you are here reading OpenLampTech! 👍
Thank you!!!
If someone awesome shared this newsletter with you and you are not yet subscribed, please use the Subscribe button below and join:
Recently Published in the OpenLampTech Publication
Earlier this week in the OpenLampTech publication, I published a high-level overview of the most significant (to me) database enhancements and upgrades for CodeIgniter 4 in 2022:
OpenLampTech has top-level sponsorship opportunities in the weekly newsletter for your brand, product, or service. As a starter publication, collaboration is very budget-friendly. Inquire by email at openlamptech@substack.com for more information.
Below is the content I am sharing I enjoyed this week:
MySQL Interview – ChatGPT is not your DBA
#sql #mysql #database #ai
My thoughts: At some point, I'm going to publish something similar for the OpenLampTech publication readers.
Very interesting dialogue with the AI, including some made-up MySQL commands which are non-existent. That just goes to show (me at least) there is a lot of hype about this kind of AI, but it is a long way off from being perfect. Or at the very best, production-ready for many programming technologies.
I'd never blindly copy and paste any code into production that came from an AI bot. But, then again, there is GitHub Copilot too…
➡️ Read more…
PHP Array Merge: 2 Methods (array_merge and +)
#php
My thoughts: PHP as a language has a plethora of dedicated array functions. The fact of the matter is, if you're using PHP, you're going to be working with arrays.
A lot.
PHP array_merge()
can be used in several different ways, returning different results. Some things to be mindful of I took away from the explanations here:
Arrays with the same key names result in the 1st key's value being overwritten with the last key's value.
Number keys will be renumbered starting at zero for the merged arrays.
Using an
+
in thearray_merge()
call, no re-indexing takes place. But, array elements that have matching keys in both arrays, resulting in the values being kept from the 1st array only.
➡️ Read more…
What Is the Difference Between a Primary Key and a Unique Key?
#sql #database
My thoughts: In order to create solid designs, we need to correctly use - and understand - both primary and unique keys.
Primary and unique keys are staples in database design and both are available in pretty much every relational database these days.
Primary and unique keys are constraints on a particular column or group of columns.
The primary key guarantees that every row in the table is identifiable because only distinct non-null values are allowed. On the other hand, a unique key only accepts distinct values but can store NULL
in the said column as well.
➡️ Read more…
Drupal 10 is worth a fresh look
#php #drupal #cms
My thoughts: Drupal is another framework that I always keep in the back of my mind as being ‘there for the picking’. Meaning, perhaps one day I should really make a concentrated effort to dig in and learn more about it.
Some highlights I learned from the article:
Drupal 10 removes support for Internet Explorer
Drupal 10 is using updated Symfony and Composer versions
The rewritten CKEditor 5 supports real-time collaboration
Drupal sites receive automatic updates
➡️ Read more…
Can I use… trim()
#sql #database
My thoughts: By default, the SQL TRIM()
function removes both the leading and trailing specific characters from the target string. Optionally, one end or the other of the string can be targeted with either the LEADING
or TRAILING
keywords respectively.
Like always, the Modern SQL articles provide a nice visual chart with related SQL implementation details.
Related: TRIM() string function in MySQL – with examples.
➡️ Read more…
📰 Get your brand, product, or service the attention it deserves with affordable classified ad placement in the OpenLampTech newsletter.
How To Create WordPress Custom Admin Page and Menu From Scratch: Ultimate Guide (Updated)
#php #wordpress #web
My thoughts: Perhaps you would like to make a custom Admin page in WordPress for a client or your own site. Or a dedicated page and area for a plugin and/or theme.
Here is your guide.
A few (of the many) WordPress PHP functions you will use are:
add_menu_page()
functionadd_submenu_page()
functionwp_enque_style()
functionwp_enque_scriot()
function
➡️ Read more…
MariaDB lost more than 50% of its value in its first 2 days as a public company
#mariadb #database #sql
Unfortunately, it seems like MariaDB didn't escape the jinx of similar Bay Area companies that have gone public this year with a drop in stock value.
With a user base of several household names (Google and Samsung to name a couple), I think MariaDB will eventually shake off these early-stage jitters as it moves more in the market.
At one point early in its infancy, MariaDB was a 'drop-in' replacement for MySQL. MariaDB has since gone on and developed into its own full-fledged RDBMS.
➡️ Read more…
Interesting Tech News and Articles 📰
🔎 Five Reasons to Add a Blog to Your WooCommerce Store
🔎 Why CIOs Need to Understand Apache Cassandra
🔎 Web hosting vs WordPress hosting: What’s the difference?
🔎 GoTrim Actively Brute Forces WordPress Websites to Gain Admin Access
🔎 Be A T H I C C Developer (My thoughts: "Definitely what I'm working towards.")
🔎 GoDaddy’s Managed WooCommerce Stores Are Basically a Cheat Code for Scaling E-commerce
🔎 IBM To Chase Oracle Accounts With 24-Core Power S1014
🔎 Lessons learned from creating a rich-text editor with real-time collaboration
🔎 Migrate from Twitter’s Now-Defunct Revue Newsletter Platform to WordPress.com Newsletter
🔎 Which programming language should you learn first? (Great piece by
)[#Classifieds and Click Ads]
🤝 OpenLampTech earns a small commission (or payment in some form) from many of these links. Your support helps keep the weekly OpenLampTech newsletter free for readers.🙏
The Scrapingdog web scraping API helps Developers extract data from any website. It offers 1000 Get Requests for Free per month and the basic plan starts at $20/month with 250000 Request Credits. Try For Free Today.
Subscribe to The Uncommon Solopreneur and learn how solopreneurs grow their businesses without working themselves into the ground.
Get smarter every single day by reading Refind. I read Refind every morning because Refind tailors the content to my interests.
The Selfish Forever newsletter is a must-read if you're even remotely (pun intended) interested in making your own way in this world. The copywriting alone is going to blow your socks off. 🧦
Thank you for reading. I hope you have a great rest of your week.
Take care.
Joshua Otwell
Visit my developer blog, Digital Owl’s Prose, where I write regularly on CodeIgniter, PHP, WordPress, and SQL.
OpenLampTech is a reader-supported publication. You can support the publication with a virtual coffee for as little as $3 (USD).
Hey Joshua, Just saw that you linked my article "Be A T H I C C Developer". Thanks so much for sharing that!