Auto Generate MySQL CRUD Statements?


I recently moved from ColdFusion and Actionscript to AngularJS and PHP...

Im pretty new to phpStorm and absolutely love it. I do, however, find myself spending an enormous amount of time writing basic CRUD statements for PHP & and MySQL. Something like what's shown below. Is there any plug-in, wizard, or assistance system that phpStorm provides that would alleviate the horrible repetative nature of CRUD statements?

$quote_number = $request->quote_number;
$person_id = $request->person_id;
$employee_id = $request->employee_id;
$location = $request->location;
$sow = $request->sow;
$quote_date = $request->quote_date;
$quote_id = $request->quote_id;
$terms_id = $request->terms_id;

$statement = $db->prepare("UPDATE
                              quote_number = :quote_number,
                              person_id = :person_id,
                              employee_id = :employee_id,
                              location = :location,
                              sow = :sow,
                              quote_date = :quote_date,
                              terms_id = :terms_id
Comment actions Permalink

Try this one if you are having trouble with CRUD in PHP and MySQL. The process depends on the method you are using. If you are using prepared statement then this one could be helpful.


Please sign in to leave a comment.