例如我們要更新某一筆資料,使用悲觀鎖寫法 不囉唆,開始提供 PHP 範例寫法: // 查出單筆的資料 $sqlA = "SELECT * FROM your_table_name1 WHERE u_id = " . $obj->id . " FOR UPDATE "; // $obj->id 是我自定義的變數 //
read more例如我們要更新某一筆資料,使用悲觀鎖寫法 不囉唆,開始提供 PHP 範例寫法: // 查出單筆的資料 $sqlA = "SELECT * FROM your_table_name1 WHERE u_id = " . $obj->id . " FOR UPDATE "; // $obj->id 是我自定義的變數 //
read more有時因為營運上的需求,會需要在資料庫先行大量新增、更新或刪除某些資料,在迴圈外寫下 bind_param(),而不是在迴圈內每個執行回合裡寫下
read more在嘗試埋設追蹤使用者操作情況事件時,常會遇到尚未完成紀錄使用者操作事件,就被網頁轉址程式碼轉走的情形。解決方法之一,是讓轉址程式碼一定要在追
read moreDon’t refine coding style and debugging/adding functions in same time when you co-working with others. For example, you may change a php file from no standard applied to be PSR2. This is because it’s hard to know through git or other common diff tools what code you have changed even though you just remove redundant spaces or identations. I recommend teams, whose consider refining your own code for reducing tech
read moreI use many plugin with VIM to boost development when I writing and debugging programs, which are written through PHP and Ruby languages. Also there are few plugin for SASS, RSpec and Javascript. Below are configurations for my VIM editor and Vundle. There must some corresponded software be installed in the computer first and then these settings will work. nnoremap means normal mode in VIM. Usage of <silent> tag is
read more最近遇到使用 PHP 函式庫的 array_uintersect() ,去找出兩陣列有相同的元素,不過執行結果不如預期。目前仍未找到解法,希望藉寫下紀錄,提醒自己以後找到解法再回來補上。
read more