Skip to content

Tag: prepared-statement

Should you use prepared statments on LIMIT

One day I was googling to understand when a prepared statment should be used. As I searched online many claimed that you should use always prepared statments. Now the question I have is… does this also count for LIMIT? I mean it is possible (I tried) but is it really that rational? Same question on ORDE…

Handle empty variable in a prepared statement

Sometimes my script receives a $_POST[“is_searchfield”] request from a form. Then I want to use this variable as a part of a “Where” clause of a MySQL query. Otherwise this part of the “Where” clause shouldn’t afflict the rest of the query. For the query I use a prepa…

PDO insert array in array

i’m confused … I am encountering a tiny issue that drives me crazy. I have arrays in an array which i’d like to insert into an SQL table. My issue is that i don’t figure out how to insert arrays in an array … The arrays: Array ( [1] => Array ( [diploma] => Master [institut]…