Showing entries 51 to 60 of 1184
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: sql (reset)
OpenLampTech issue #15 – CodeIgniter 4 select() methods in depth

Sit back, grab your beverage of choice, and get ready for a deep-dive issue of OpenLampTech, the newsletter for PHP/MySQL developers. This month’s featured piece covers select-like methods in the CodeIgniter 4 Query Builder class. Thanks for being here to read the publication

The Newsletter for PHP and MySQL Developers

Receive a copy of my ebook, “10 MySQL Tips For Everyone”, absolutely free when you subscribe to the OpenLampTech newsletter.

Take your time with this week’s issue of the OpenLampTech featured piece.

There is original and curated content …

[Read more]
Create a comma-separated list with MySQL GROUP_CONCAT()

In this blog post, we will learn how to group sets of values into a comma-separated list, for each group, using the MySQL GROUP_CONCAT() function. Continue reading for more information…

Do you need to learn MySQL? Just starting and confused about how to query a table and get the data you need? I am creating premium MySQL Beginners content for this specific reason. To help those who want to learn the basics of MySQL but don’t know where to start. Learn more about the premium blog posts as I develop and release them.

Tell me more!

Self-Promotion:

If you enjoy the content written here, by all means, share this blog and your favorite post(s) with others who may benefit from or like it as well. Since coffee is my favorite drink, you can even buy me one if you would like!

[Read more]
OpenLampTech issue #14

Rolling right along this week with another loaded issue of OpenLampTech, the newsletter for PHP/MySQL developers. Glad to have you here reading this week’s issue.

Do you need to learn MySQL? Just starting and confused about how to query a table and get the data you need? I am creating premium MySQL Beginners content for this specific reason. To help those who want to learn the basics of MySQL but don’t know where to start. Learn more about the premium blog posts as I develop and release them.

Tell me more!

Image by …

[Read more]
Counting with countAll() and countAllResults() in CodeIgniter 4

Getting a count of table or query rows in CodeIgniter 4 is quite easy using either of the Query Builder countAll() or countAllResults() functions. Continue reading to see examples of each…

Do you need to learn MySQL? Just starting and confused about how to query a table and get the data you need? I am creating premium MySQL Beginners content for this specific reason. To help those who want to learn the basics of MySQL but don’t know where to start. Learn more about the premium blog posts as I develop and release them.

Tell me more!

Image by  …

[Read more]
Dynamic Drop Table

I always get interesting feedback on some posts. On my test case for discovering the STR_TO_DATE function’s behavior, the comment was tragically valid. I failed to cleanup after my test case. That was correct, and I should have dropped param table and the two procedures.

While appending the drop statements is the easiest, I thought it was an opportunity to have a bit of fun and write another procedure that will cleanup test case tables within the test_month_name procedure. Here’s sample dynamic drop_table procedure that you can use in other MySQL stored procedures:

CREATE PROCEDURE drop_table
( table_name  VARCHAR(64))
BEGIN
 
  /* Declare a local variable for the SQL statement. */
  DECLARE stmt VARCHAR(1024);
 
  /* Set a session variable with two parameter markers. */
  SET @SQL := CONCAT('DROP TABLE ',table_name);
 
  /* Check if the …
[Read more]
str_to_date Function

As many know, I’ve adopted Learning SQL by Alan Beaulieu as a core reference for my database class. Chapter 7 in the book focuses on data generation, manipulation, and conversion.

The last exercise question in my check of whether they read the chapter and played with some of the discussed functions is:

  1. Use one or more temporal function to write a query that convert the ’29-FEB-2024′ string value into a default MySQL date format. The result should display:
    +--------------------+
    | mysql_default_date |
    +--------------------+
    | 2024-02-29         |
    +--------------------+
    1 row in set, 1 warning (0.00 sec)
    

If you’re not familiar with the behavior of MySQL functions, this could look like a difficult problem to solve. If you’re risk inclined you would probably try the STR_TO_DATE function but if you’re not risk inclined the description of the %m specifier might suggest you …

[Read more]
Case Sensitive Comparison

Sometimes you hear from some new developers that MySQL only makes case insensitive string comparisons. One of my students showed me their test case that they felt proved it:

SELECT STRCMP('a','A') WHERE 'a' = 'A';

Naturally, it returns 0, which means:

  • The values compared by the STRCMP() function makes a case insensitive comparison, and
  • The WHERE clause also compares strings case insensitively.

As a teacher, you’re gratified that the student took the time to build their own use cases. However, in this case I had to explain that while he was right about the STRCMP() function and the case insensitive comparison the student used in the WHERE clause was a choice, it wasn’t the only option. The student was wrong to conclude that MySQL couldn’t make case sensitive string comparisons.

I modified his sample by adding the required BINARY keyword for a case sensitive comparison in …

[Read more]
Find the first and last day of a month with MySQL – Medium repost

Knowing the first and last day of a given month can help you figure out other information relevant and important data. You can determine these values using select MySQL date functions. Learn how in this Medium post I’m resharing here for any interested readers…

Get tailored articles with Refind delivered each day in your inbox. Refind is part of my daily reading habit. Make it part of yours by using my referral link. At no additional cost to you, I will be eligible for a premium subscription with more sign-ups from my link. The essence of the web, every morning in your inbox. Subscribe for free

The Newsletter for PHP and MySQL Developers

Receive a copy of my ebook, “10 MySQL Tips For Everyone”, absolutely free when you subscribe to the …

[Read more]
OpenLampTech MySQL Extras – Substack Writing

Not only do I share the weekly OpenLampTech newsletter, but I’m also publishing some articles outside of the publication, directly to my Substack page. I’m resharing the last 2 I’ve posted over on my Substack for any interested readers…

Do you need to learn MySQL? Just starting and confused about how to query a table and get the data you need? I am creating premium MySQL Beginners content for this specific reason. To help those who want to learn the basics of MySQL but don’t know where to start. Learn more about the premium blog posts as I develop and release them.

Tell me more!

MySQL SHOW TABLES – Two Variations

This post is an excerpt from some premium content I am creating here on my blog for beginners wanting to learn MySQL.

Read the full substack article: …

[Read more]
OpenLampTech issue #12 – My RTC Interview

Hey hey! Glad you are here for this week’s issue of OpenLampTech, the newsletter for PHP/MySQL developers. You are going to love what’s in this publication. I’m sharing some of my personal Developer stories which have never been published online anywhere else before. Enjoy!

Do you need to learn MySQL? Just starting and confused about how to query a table and get the data you need? I am creating premium MySQL Beginners content for this specific reason. To help those who want to learn the basics of MySQL but don’t know where to start. Learn more about the premium blog posts as I develop and release them.

Tell me more!

Image by  …

[Read more]
Showing entries 51 to 60 of 1184
« 10 Newer Entries | 10 Older Entries »