MSSQL: MYSQL:
Casting string to bigint for MSSQL & MYSQL
MSSQL: MYSQL:
MYSQL Row_number usage and example
Imagine data as below:- category_id item_name 1 Item A1 1 Item A2 1 Item A2 2 Item B1 2 Item B1 2 Item B2 3 Item C1 3 Item C2 In this query: Now, let’s see the result of executing this modified query on our sample data: category_id item_name displayOrder 1 Item A1 1 1 […]
XAMPP DB Crash fix
It is possible, I found out a solution: Install new xampp Copy your old database folder from xampp\mysql\data\databasefolder to Paste in your running xampp folder C:\xampp\mysql\data After that stop mysql and apache service then backup your running xampp files ib_logfile0,ib_logfile1 and ibdata1 and store in safe place Then Copy same file (ib_logfile0,ib_logfile1 and ibdata1) from […]
PHP MSSQL PDO
You can download the PDO for sql server here. Next you would want to add the dll or so into your php.ini. ;;;;;;;;;;;;;;;;;;;;;; ; Dynamic Extensions ; ;;;;;;;;;;;;;;;;;;;;;; extension=php_pdo_sqlsrv_74_ts_x64.dll extension=php_sqlsrv_74_ts_x64.dll
Nested for loop break ( multi-level up to 4 layer)
In below example will have 4 arrays and will be nested. Below example will break 2 which means that it will go back to Loop B. In order to go back to Loop A , will be break 3. break 4 will stop the everything, which means it won’t loop anymore $array1 = array(‘1′,’2′,’3′,’4’); $array2 […]
Rerun an array even if the loop will change the array elements
I have this problem where i will need to loop an array but while looping it , i will add elements into array and i need to loop that data as well. Below are an example that you can do so:- $array = array(‘1′,’1.5′,’3′,’5′,’7’); $count = count($array); for($i=0; $i
Parallax example
https://keithclark.co.uk/articles/pure-css-parallax-websites/
Netbeans PHP Xdebugger
https://www.codewall.co.uk/debug-php-with-xdebug-on-netbeans/ Highlight all of the information on the page and copy it. Go to the XDebug Wizard tool. Paste the information into the Text Box input on the wizard tool page. Locate and click the ‘Analyse my phpinfo() output’ button. Download the provided module under Instructions Before pasting the below part make sure the ext downloaded is compatible […]
Git Rebase to ammend old commit’s author / comments
1. Run this code to start git rebase $ git rebase -i {COMMIT_HASH} 2. Change the lines that you want to edit from “pick” to “edit” 3. $ git commit –amend –author=”Author Name <email@address.com>” 4. $ git rebase –continue 5. Use code below to update your origin with the updated commits. $ git push -f […]