Skip to content

u/d32

In this archive from Dec 2012 to May 2014

1
posts
10
comments
1
media
31
score

I separate SQL from PHP as much as possible:

$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
";
1 points

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.

-1 points

End of this list.

Back to top

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.