Formatieren Sie MySQL-Code in einem PHP-String
Gibt es eine Programm-IDE oder keine, die MySQL-Code in einem PHP-String formatieren kann, z. Ich benutze PHPStorm IDE und es kann es nicht tun.
Dies gilt für PHP und MYSQL, nicht jedoch für MYSQL in PHP-Strings. Ich bin bereit, neue IDE zu verwenden, weil jetzt ich Hunderte Datenbank-Anträge manuell formatieren muss, die eine Zeile und nicht lesbar sind. Das einzige Kriterium für meine Wahl ist, dass ide dies automatisch tun kann.
<?php
...
$request1 = "select * from tbl_admin where admin_id= {$_SESSION['admin_id']} and active= 1 order By admin_id Asc";
...
?>
soll werden
<?php
...
$request1 = "SELECT *
FROM tbl_admin
WHERE admin_id = {$_SESSION['admin_id']}
AND active = 1
ORDER BY admin_id ASC";
...
?>