#1.update voucher update voucher set stock_id = 33, status_id = 1, type_id = 0, expiry_date = NULL where voucher_id = 228534 #2.delete voucher_action delete from voucher_action where voucher_id = 228534 and action_id = 30 #3.delete voucher campaign issue delete from voucher_campaign_issue where voucher_id = 228534 delete from voucher_campaign_issue_request where request_id = 30217 #4.delete request delete from voucher_request_approve where request_id = 30217 #5.delete voucher batch delete from voucher_batch where batch_id = 65236 delete from voucher_batch_no_section where batch_id = 65236 #6. check receipt select * from voucher_receipt_numbers where voucher_ids like '"8534%'
分类: 记事
给parkway的store list
select storeId, storeName, unit,vendor_no as VendorID, payee, contact, telephone, address, bank_name from parkway.store where isActive = 'Y' order by storeName asc #FOR MG select storeId, storeName,category, unit, isActive, is_still_vms_available from store where storeId > 1000 order by storeName asc
密码保护:反思这一年走过的路(上)
判断是否为ajax请求
判断是否为ajax请求 现在基类定义 define('IS_AJAX', isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'); 然后在使用的时候直接if(IS_AJAX){}就ok了 很方便。
直接解析ip访问test.icolumn.com的问题
昨天调试用别的电脑解析ip到我电脑上访问 test.icolumn.com的时候会反复的重定向然后报错
原因在evolution/admin/app/controllers/user.php的_forece_https方法里
去掉
redirect ($new_url); exit; 即可
写sql的老手~鸿池
今天再鸿池后面看着他写sql,啪啪啪打了一大串,这么长的一串sql要是我以前看起来根本就是不是我能企及的。可能你们看到我这样说觉得很可笑,个人能力不高,不过贵在努力学习。
因为之前工作中涉及sql的操作并不多,说起来有些羞愧,这尼玛还好意思舔着脸和别人说工作经验xx年,工作项目xxxxxx。看看人家这写码的素质~,自愧不如啊~
首先,鸿池先在sql工具里写了第一段的sql作为a取出自己需要的字段检查正确性作为a,然后再在sql工具中写另一段sql取出自己需要的字段检查正确性作为b,然后再取出自己需要的字段。
废话不说上代码~~
select a.voucher_value, a.voucher_number as exp_voucher, date(a.issue_time) as exp_issue_date, a.expiry_date as exp_expiry_date , a.expiry_grace_date as exp_expiry_grace_date , b.voucher_number as new_voucher, date(a.replace_time) as replace_date , b.expiry_date as new_expiry_date , b.expiry_grace_date as new_expiry_grace_date from ( select a.expired_voucher_id, b.voucher_value, concat(prefix, voucher_text, suffix) as voucher_number, max(c.action_time) as issue_time, b.expiry_date , DATE_ADD(b.expiry_date, INTERVAL $this->_grace_period_days DAY) AS expiry_grace_date , a.replace_time from $this->_voucher_replace_details a, $this->_voucher b, $this->_voucher_action c where a.expired_voucher_id = b.voucher_id and b.voucher_id = c.voucher_id and c.action_id in ('$issue_action_id', '$issue_action_id2', '$issue_action_id3') $value_clause AND (a.replace_time BETWEEN '$quarter_start_date 00:00:00' AND '$quarter_end_date 23:59:59' ) group by b.voucher_id ) a, ( select a.expired_voucher_id, b.voucher_value, concat(prefix, voucher_text, suffix) as voucher_number, max(c.action_time) as issue_time, b.expiry_date , DATE_ADD(b.expiry_date, INTERVAL $this->_grace_period_days DAY) AS expiry_grace_date from $this->_voucher_replace_details a, $this->_voucher b, $this->_voucher_action c where a.new_voucher_id = b.voucher_id and b.voucher_id = c.voucher_id and c.action_id in ('$issue_action_id', '$issue_action_id2', '$issue_action_id3') AND (a.replace_time BETWEEN '$quarter_start_date 00:00:00' AND '$quarter_end_date 23:59:59' ) group by b.voucher_id ) b where a.expired_voucher_id = b.expired_voucher_id ORDER BY 2 ASC
留念学习,理清逻辑,其实你也可以做到~~
关于这次搭建的博客
之前确实也做过类似的博客,但是后来很久没用就搁浅了。然后总想把自己学习的东西记录在一处,却感觉又无处安放,所以就有了这个博客。
正好新公司要用到Codeigniter这个框架,我就在网上搜索了又Codeigniter开源的代码‘STBOLG’,由于人比较懒,前段时间又已经用CI自己写了个小企业站整体的流程也简单有个了解,所以就不想自己动手写了,这个博客系统还不错,简单朴素,不想花过多的精力去找前端的模板了,反正也是自己当作积累的一个地方,不打算对外开放。
第一步我打算把之前看的《深入PHP 面向对象,模式与实践》中关于设计模式的一些东西用自己的方式记录下来,应为中断了一个多月没看,发现对立面的东西又开始陌生了,本来第一遍看的时候就模模糊糊的。也是因为平常工作中没有机会用到这些设计模式。但这次不同,新公司是有这个需求的。
好了不说了,开始吧…