Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Posts by Charlie Brumbaugh
It is not wrong to ask for changes or features or report problems, so long as you realize that the maintainer of the project is under no obligation to make those changes. You aren't paying them, so...
Lets say I have two tables, A and B and I need to join a subset of them. Is there best practices of sticking the conditions in the WHERE clause like this, SELECT * FROM A JOIN B on a.fk_b = b....
Let's say I have a script that needs the user to set X number of variables at the start. One can either Pass the arguments in on the command line. Start the program and then have the user input...
From time to time I will have large structural changes to make on my MySQL DB, things like adding columns, changing datatypes, adding indexes etc. These types of changes result in downtime and what...
I have two tables with millions of records. Every so often I need to join them and exclude just a handful of records where a bit(1) column is set to 1 instead of 0. I can do it with either, WHERE ...
Sometimes, either to reduce the amount of typing big table names or when joining a table to itself one will need to alias a table. Personally I find SQL statements with aliases harder to read and a...
You should be able to alias the string to something short. For example, I have git config --global alias.a 'add .' git config --global alias.ci commit and so instead of git add . git commi...
The objective here is to create a set of square kml coordinates centered on a point. I use this to create a square map centered on a mountain peak and then turn that into a STL that I can 3D print....
Its possible to execute a MySQL file from the command line like so, mysql -u USER -pPASSWORD < FILENAME which triggers a warning, mysql: [Warning] Using a password on the command line int...
I have a number of command line PHP scripts that are either run by a user or by Windows Task Scheduler. These scripts use DB and API credentials and I am wondering if there is a better way of stori...
If one is using SASS to build a websites CSS and using version control one can either, Keep both the SASS and the resulting CSS files in version control. Only storing the SASS files in version con...
Let's say I have a table with 10,000 rows and instead of selecting all of the rows at once I select 1,000 at a time like LIMIT 0,1000 LIMIT 1000,1000 etc. Without an ORDER BY statement the or...
I have tables A and B and then I have a many to many join table with foreign keys to both called a_b. Neither foreign key can be null and the combinations for the foreign keys to A and B are unique...
I would like to see questions asking for help finding resources be considered on topic, but I would suggest creating a seperate category for them, like how Photography and Outdoors have one for Gea...
On the old sites, if you wanted to tag something with [sql] and [mysql] that required two tags. However, because we have hierarchal tags where [mysql] is a child of [sql] you only need to tag it wi...
In programming instead of arrowcode where one has many layers of indented if statements, you can return a result as soon as possible. So instead of, if if end if end if It looks like if ret...
Let's say we have two tables A and B and a join table C that has foreign keys to both A and B and the combination of those foreign keys is unique. One could either do a unique constraint or a comp...
Due to a series of unfortunate events I have some tables where the auto_increment value got behind what it should be. If the auto_increment value is 9 and there are 20 rows in the table the next 1...
I have a database with quite a few VARCHAR fields. When the database was first built the lengths of the columns were set a bit larger than absolutely necessary. Now after, having used the DB for a ...
I have a PHP script that uses CURL to return a JSON result that looks //Curl set up code $result = curl_exec($ch); //Error checking code $json = json_decode($result, true); //Code to process r...
I have a column that is a concatenation of 5 other columns plus a join to a different table. UPDATE db.a JOIN db.b ON fk_b = b.pk SET concat_field = CONCAT(field1,field2,field3,b.field,field4,fi...
In PHP one can either use include or require to include files, the difference is that if the file doesn't exist it will emit a fatal error and halt with a require and only emit a warning with inclu...
I have a PHP program that does a SELECT and then updates some of the values based on an algorithm. Rather than updating one row at a time UPDATE example_table SET COLUMN_A = 1 WHERE primary_k...
I have a very large table that I need to iterate through with a PHP script and I can't do all of the results at once so I do it in sections with a LIMIT like for ($x = 0; $x < 10000000; $x += 1...
So I had a table with a primary key and a bunch of different columns. Columns A, B, and C were all unsigned ints (like the primary key column) and each column had a unique constraint I dropped the...