$query = "
SELECT u.email, oi.data
FROM order o
INNER JOIN user u ON o.owner = u.user
INNER JOIN info oi ON o.order = oi.order
WHERE u.email <> ''
AND o.payment_state = 'payment_confirmed'
GROUP BY u.email
ORDER BY o.order DESC
LIMIT 10
";
Missing namespacing is a big issue unhandled by author. There are workarounds.
Return value is not needed - function succeeds or throws an exception. $found is an internal flag serving this purpose.
Usage of preg_match is actually a strong point - you as the user have the option to both handle or disallow url examples you've mentioned. Freedom is good.
Readable code is self-explaining and much easier to maintain. Putting spaces "only where needed" and not using empty lines is great way to make the code less readable.
Newbie here. How do I actually use this server? I had the Vagrant do the lifting for me, image was installed and is running. I can ping the virtual machine, but I can't ssh to it (don't know password) nor display any web output from it (doesn't listen on port 80)...
Well this may sound both trivial and hard-to-follow advice, but I think it should be considered:
If you stop liking something, stop doing it. At least for a while.
Because I was putting Brazilians and people from USA in the same bucket.
This. EU is not a single country and wages do widely differ. Yet, even the poorest countries have to pay more than "Americans".
It goes beyond just the database, take a look at both available files - index.php and redirect.php: that's some ugly copy&pasting!
Templates? Either in PHP or anything else (Smarty, Twig etc.).
I separate SQL from PHP as much as possible:
Missing namespacing is a big issue unhandled by author. There are workarounds.
Return value is not needed - function succeeds or throws an exception. $found is an internal flag serving this purpose.
Usage of preg_match is actually a strong point - you as the user have the option to both handle or disallow url examples you've mentioned. Freedom is good.
See glue.php for inspiration, good code and flexibility.
Second, of course. Kill the first guy.
Readable code is self-explaining and much easier to maintain. Putting spaces "only where needed" and not using empty lines is great way to make the code less readable.
Newbie here. How do I actually use this server? I had the Vagrant do the lifting for me, image was installed and is running. I can ping the virtual machine, but I can't ssh to it (don't know password) nor display any web output from it (doesn't listen on port 80)...
Well this may sound both trivial and hard-to-follow advice, but I think it should be considered: If you stop liking something, stop doing it. At least for a while.
End of this list.
Back to top