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
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...
For my purposes, it is secure enough to use passwords to execute MySQL commands on the command line, what I would like to do is disable the warning that says, mysql: [Warning] Using a password on ...
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...
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...
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...
On this question https://software.codidact.com/questions/279097 there are two code blocks, but the color of the text is different. I directly copied and pasted the code so I don't see why some o...
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...
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 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...
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....
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...
The easy way is to run this query. SELECT concat('DROP PROCEDURE IF EXISTS example_database.',routine_name ,';') FROM INFORMATION_SCHEMA.Routines WHERE ROUTINE_SCHEMA = 'example_database'; F...
I need to drop all of the stored procedures from my MySQL database before I recreate them. How can I do so?
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...
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 a stored procedure let's say I have a VARCHAR variable, DECLARE example_variable VARCHAR(100); how much memory is allocated to it and is that independent of the length of the data in the var...
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...
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....
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...
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...
Currently, we have a CRUD plus reporting application that talks to one MySQL database. Intermittently users will report locks when searching, currently, I can only get the approximate time of when ...
I have a couple of 3d example projects in gcode for my printer but the printer bed has a couple of bumps in the center (where things are printed by default) and in order to print the objects I woul...
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...
I have a number of MySQL stored procedures that use a cursor to go through a select and then pass the results to other stored procedures one row at a time. This can take a while to run, what is hap...