We have a multiuser Machform PHP application running on a Redhat 7 Linux server with Apache webserver and MariaDB database. In a specific form after page 3, accessing this URI: confirm.php?id=NNNNNNNN&mf_page_from=3 where NNNNNNNN is the id number of the form, The following error message appears: SQL: [671] select A.element_id, A.option_id, (select if(B.element_matrix_parent_id=0,A.option, (select C.`option` from

I have two different Linux servers, and wanted to test if one where faster than the other. I used mysqlslap together with the “time” command in a bash shell. # time mysqlslap –user=root –password=$(cat /root/mysql) –host=localhost concurrency=50 –iterations=100 –number-int-cols=5 –number-char-cols=20 –auto-generate-sql –verbose In this way I could get out different values from the server which

I tried to upgrade Moodle 2.2.1 to 2.6.2+ and got this error message: Default exception handler: DDL sql execution error Debug: Data truncated for column ‘institution’ at row 999 ALTER TABLE mdl_user MODIFY COLUMN institution VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT ” after phone2 Error code: ddlexecuteerror The solution was to run

If you just need a quick way to get some data from a mysql database in your shell (bash), you could do something like this in one line: mysql -h your.server.edu -u db_username -p`cat /path/to/your/homedir/secretpasswordfile` -e “;use databasename; SELECT tablename.columnname FROM tablename where id like ‘421111’ and something like ‘1’ and option like ’23’;”; >

We had a lot of spam users in our multisite wordpress system. This was because we had self-registration enabled for a period. Not a smart thing to do… anyway, I wrote a bash script in order to find which users id’s from the Mysql database that could potentially be spam users. With this list of

I had to send emails to all the Blog admins in our WordPress Multisite installation. This is how I did it: [code lang=”php”] <?php # Alert Blog Admin php script # connect to blog db, select from, find all blog admin email adresses # get subject, body from pre-created local files, send the email #