Welcome Guest, Not a member yet? Register   Sign In
form validation is_unique using array

(04-20-2021, 01:08 AM)iRedds Wrote: @includebeer Answer the question. Which is better than 1 SQL query or N-SQL queries?

Each tool must be used correctly.
When you hold a hammer in your hands, everything around becomes nails.

Haha! That is some dense BS! Micro-optimization is not the solution either. It's not like he have 5000 record to check or if the table contains millions of record. If you have a simple form with something like 10 values to check in the database, you won't gain anything with your solution. You are better off optimizing the database with indexes than trying to cram everything in a single request. Building a custom request for each use case is worst that reusing a simple select. Don't forget that database engines also have built-in optimization and cache.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/

Messages In This Thread
RE: form validation is_unique using array - by includebeer - 04-20-2021, 03:16 PM

Theme © iAndrew 2016 - Forum software by © MyBB