Reformat Code in MySQL string variable inside PHP code.
Can PHPStorm reformat MySQL code inside php to look better? The MySQL code is string though.
e.g. i have php
<?php
$get_users = "select * from users where status = {$status}";
runquery($get_users);
?>
I want it to look like
<?php
$get_users = "SELECT *
FROM users
WHERE status = {$status}";
runquery($get_users);
?>
Please sign in to leave a comment.
Ok i searched many times and it cannot do it i am moving to another IDE
If that is the only reason (code formatting) ... good luck then in your searches (there are quite few editors to choose from). I'm sure you will find it, that one that does the most important thing (from programmers POV) -- code formatting!!
Andrjusha There's number of things that dont work with PHPStorm this one is one of them. And when take get project from other designer with 1000 queries you dont want to sit and format them manually as i have to do because i decided to keep the IDE.
Whats the most important feature/feature's to you Refactor/Find Usages/Delete? It does not work properly either.
Anything else?
Yeah I know the lack of this feature is a pain. What I do is format it ouside of PHPStorm and cut-paste (I use a front-end called Navicat).
@Andriy
" I'm sure you will find it, that one that does the most important thing (from programmers POV) -- code formatting!!"
I wasn't gonna respond to this.. but you pissed me off. Where do you get off prioritizing what's important to anyone? Maybe he WANTS better code formatting (I would).
THIS IDE lacks several features I'd like to see, which I'm sure you don't consider worthly enough for "real" programers.
Just be sure to file a feature requests for those. The evolution of the product is *not* finished in any aspect.