Posts

New Queries on Pocket

to Find Current time income not deleted and status not canceled SELECT * FROM b_pocketpa.vendor_appointment_payments where vendor_id=204 and payment_timestamp between "2018-07-01"  and "2018-07-31" and status != 4 and deleted !=1 // fetch all the appointments agains a vendor in this timespam SELECT COUNT(*) FROM `vendor_appointments` WHERE vendor_id=532 and appointment_datetime BETWEEN "2018-07-01"  and "2018-07-31"  and deleted =0 ORDER BY `vendor_appointments`.`id` ASC find all apointment that are Attended by Vendor and Payment status is not paid(un-pain,partialy paid) SELECT * FROM `vendor_appointments` WHERE vendor_id=532 and appointment_datetime BETWEEN "2018-07-09"  and "2018-07-15"  and deleted =0  and appointment_status = 2 and payment_status IN (2,3) ORDER BY `vendor_appointments`.`id` ASC Vendors appointments paid or partialy paid after provided time spam and apointment status is pending SELECT...

SSH Commands

How to determine/change Root session working directory on Windows root [0] .! pwd /home/root root [1] .! cd project1 /home/root/project1 REFERANCE vim FileName                    //TO OPEN A FILE INTO SSL AFTER EDIT JUST esc AND THEN TYPE :wq! move all files to Parent folder mv * .[^.]* ..

Git Commands

Image
Create a new repository  on GitHub. To avoid errors, do not initialize the new repository with  README , license, or  gitignore  files. You can add these files after your project has been pushed to GitHub. Open  Git Bash . Change the current working directory to your local project. Initialize the local directory as a Git repository. git init Add the files in your new local repository. This stages them for the first commit. git add . # Adds the files in the local repository and stages them for commit. To unstage a file, use 'git reset HEAD YOUR-FILE '. Commit the files that you've staged in your local repository. git commit -m "First commit" # Commits the tracked changes and prepares them to be pushed to a remote repository. To remove this commit and modify the file, use 'git reset --soft HEAD~1' and commit and add the file again. At the top of your GitHub repository's Quick Setup page, click   to copy the remote repository UR...

cakephp useful codes

to Reset password controller function   $hasher = new \Cake\Auth\DefaultPasswordHasher();  debug($hasher->hash('00112233')); exit(); How to on Debug mode cakephp3 down vote According to the  cookbook , you can enable or disable the debug mode by changing the value of the "debug" parameter in the config/app.php file. /** * Debug Level: * * Production Mode: * false: No error messages, errors, or warnings shown. * * Development Mode: * true: Errors and warnings shown. */ 'debug' => filter_var ( env ( 'DEBUG' , true ), FILTER_VALIDATE_BOOLEAN ), And in your controller, you can do logging using the  log() method  (available for all objects) : $this -> log ( 'debug message' , 'debug' ); $this->log($data, 'debug');

OpenCart 3.0.2.0 cache issue Resolve

https://github.com/vqmod/vqmod/issues/128 https://github.com/vqmod/vqmod/issues/135 usmanalimaan Fiverr Seller Experienced Developer with a demonstrated history of working in the computer software industry. I have two year plus working experience in web development using php frameworks like Cakephp, Laravel and codeigniter and using php versions 5 and 7 , mysql , sqllite . Do have hand on practice with Restful apis. Strong engineering professional with a Bachelor’s Degree focused in Bscs from GC University Lahore.

how to update entire Category price in OpenCart

Image
We will do this by directly updating into databases Here are Steps to do this 1>Search Category by Name here is script SELECT * FROM `oc_category_description` WHERE name in ("Clothing" , "Kids dresses") 2> No get Products Prices and Special price by just provide category id SELECT   pc .product_id , category_id , p .product_id , ps .product_id , p .price , ps .price   FROM   oc_product   as   p   join   `oc_product_to_category`   as   pc   on   pc .product_id = p .product_id   JOIN `oc_product_special`   as   ps   on   p .product_id = ps .product_id   WHERE   pc .category_id = 415 3> Now its time to update prices of all Products once by updating price and special price UPDATE  oc_product as p join `oc_product_to_category` as pc on pc.product_id=p.product_id JOIN `oc_product_special` as ps on p.product_id=ps.product_id SET ps.price=0 WHERE pc.category_id=656 U...

What is ORM and Which ORM is used by CakePhp

Object Relational Mapping Object Relational Mapping, commonly referred to as its abbreviation ORM, is a technique that connects the rich objects of an application to tables in a relational database management system. Using ORM, the properties and relationships of the objects in an application can be easily stored and retrieved from a database without writing SQL statements directly and with less overall database access code. Source: http://guides.rubyonrails.org/active_record_basics.html An ORM (Object Relational Mapper) is the layer that sits between your database and your application. In Object Oriented Programming, you work with Objects as your main point of reference. source:  http://culttt.com/2014/06/18/whats-difference-active-record-data-mapper/