Hobbyist_PHPer Posted August 27, 2012 Share Posted August 27, 2012 Hi, I had a question regarding PHP best practices... I was somewhere the other day and I came across a PHP job posting, not that I am qualified or interested, but I decided to read the requirements anyway... The thing that caught my attention was that it mentioned that if you are a programmer that still puts queries in their code, then there was no need to apply... so my questions is this, is it bad practice to put queries in with the rest of the PHP code? If so, then what's the proper method? Link to comment https://forums.phpfreaks.com/topic/267640-php-best-practices/ Share on other sites More sharing options...
MMDE Posted August 27, 2012 Share Posted August 27, 2012 Got a link to an example? Link to comment https://forums.phpfreaks.com/topic/267640-php-best-practices/#findComment-1372745 Share on other sites More sharing options...
xyph Posted August 27, 2012 Share Posted August 27, 2012 How else do you perform queries? Link to comment https://forums.phpfreaks.com/topic/267640-php-best-practices/#findComment-1372747 Share on other sites More sharing options...
PFMaBiSmAd Posted August 27, 2012 Share Posted August 27, 2012 I think the intent of the statement concerns using a database abstraction layer, which would have the affect of removing the actual execution of the query from within the application code and moving it to one single place in the abstraction layer. Link to comment https://forums.phpfreaks.com/topic/267640-php-best-practices/#findComment-1372750 Share on other sites More sharing options...
Jessica Posted August 27, 2012 Share Posted August 27, 2012 That's a rather unprofessional way to phrase things especially for a job posting, and I would be wary of any company that would use language like that in a job posting. I'm with xyph, how do you run queries if they're not in the code? I'd love to see the job ad. Link to comment https://forums.phpfreaks.com/topic/267640-php-best-practices/#findComment-1372752 Share on other sites More sharing options...
.josh Posted August 27, 2012 Share Posted August 27, 2012 I think the intent of the statement concerns using a database abstraction layer, which would have the affect of removing the actual execution of the query from within the application code and moving it to one single place in the abstraction layer. +1 Link to comment https://forums.phpfreaks.com/topic/267640-php-best-practices/#findComment-1372778 Share on other sites More sharing options...
tibberous Posted August 27, 2012 Share Posted August 27, 2012 That's a rather unprofessional way to phrase things especially for a job posting, and I would be wary of any company that would use language like that in a job posting. This. Best case, you'll work for a pretentious asshole; worst case the 'job' will be for a 'startup' that will want to pay you in 'shares'. Link to comment https://forums.phpfreaks.com/topic/267640-php-best-practices/#findComment-1372781 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.