Skip to content

u/diosio

In this archive from Jan 2013 to Jul 2016

1
posts
42
comments
0
media
71
score

Top posts

PHP prepared statements error checking

Hello people ! For a while now I've been using prepared statements, but there's something that is bothering me. So far, on php.net manual the process is $mysqli = new mysqli(...); if($mysqli){ $stmt = $mysqli->prepare($stmt); if($stmt){ $stmt->bind(..) if(....).... } } My question is, is there a way...

3 points21 comments
Open on Reddit

Top comments

If you haven't yet installed arch, you could go with a pre-configured distro like Archbang, Cinnarch, Manjaro, etc. You can find the full list here Archwiki - Arch Based Distributions

I myself had arch in the beginning and after some breakage, reformatted and put Archbang, to take the GUI hassle away, and I suppose since you are a beginner it could be useful ! You get to use pacman as well, which is a great package manager!

Suggestion though, if you have a pc now that is live and running, try installing VirtualBox and installing the OSs you would like to try in a VM first, before committing to one permanently.

5 points

no, just make sure you are using prepared queries to minimise the risc of SQL injections. that is to say, avoid doing things like

$mysqi->execute("select * from table where name='".$_GET/POST/REQUEST['name']."'");

or similar silly things. I would also recommend using PDO (even though I use mysqli myself as well, find it less complicated), as you will have a lot less to worry aabout in case you switch your DB backend

3 points

Subreddits

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.