Category: Database
-
Arabic text in Database got garbled
Today, out of the blue, my MySQL database started garbling Arabic text entries. Here’s how I fixed it. I downloaded mysql backup, copied the lines with Arabic text. Used this website https://string-functions.com/encodedecode.aspx Convert from Windows-1252 to utf-8 After the conversion, I created a new database and restored the .sql file.
-
PHP | MYSQL CONNECT, INSERT, SELECT, UPDATE II
This method is more secure Resource: https://www.php.net/manual/en/mysqli-stmt.bind-param.php https://www.w3schools.com/php/php_mysql_prepared_statements.asp
-
php | Wrap input value for security
To prevent misusing inputs for SQL injection You should wrap the output in htmlspecialchars() for security. https://radu.link/keep-form-data-submit-refresh-php/
-
Python MySQL Connection with MAMP | macOS
Here are how I connected to phpMyAdmin – MySQL Database
-
Useful websites: SQL
SQL minifier https://www.webtoolkitonline.com/sql-minifier.html SQL Formatter http://poorsql.com/
-
asp.net | Date conflict mm/dd
In our region we use the UK format for dates (dd/mm) however, the SQL database default time line is US (mm/dd), that could create problems while inserting dates into the database. To solve this issue, in SQL Server Management studio Add the following code in web.config