Is the format of this PDO mysql statement correct

I have been writing simple php programs, trying to adhere to the PSR standards, for writing code.

However they do not seem to have any standards for writing mysql PDO statements in.

For example I have written the mysql statement;

$sql = "INSERT INTO `users`(       `name`,        `phone`,        `city`,       `date_added`       )VALUES(         :name,         :phone,         :city,         :date)"; 

Is this a correct way of formatting? Or is there anything I can do to enhance it or follow some guidelines similar to PSR on how to write these types of statements in?


Category: php Time: 2016-07-28 Views: 0
Tags: php mysql pdo

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 0.105 (s). 12 q(s)