Category : pdo

how can I display values from the database of the Stand column with the help of the Datum column between two dates? I tried the following code, but no result: $sqlAverage10 = "SELECT Stand FROM Aktienstand WHERE Symbol=:symbol AND Datum BETWEEN :startDate AND :endDate10"; if ($stmtAverage10 = $pdo->prepare($sqlAverage10)) { $stmtAverage10->execute(array( ‘:symbol’ => $kurs[‘Symbol’], ‘:startDate’ => ..

Read more

I don’t understand why I’m getting an empty array back. My code looks like this. $startDate = $kurs[‘Datum’]; $startDatesubstr = substr($startDate, 0, 0) . "’" . substr($startDate, 0) . "’"; $endDate10 = date("Y-m-d", strtotime($kurs[‘Datum’].’- 10 days’)); $endDate10substr = substr($endDate10, 0, 0) . "’" . substr($endDate10, 0) ."’"; $symbolsubstr = substr($kurs[‘Symbol’], 0,0) . "’" . substr($kurs[‘Symbol’], ..

Read more

I have the following config file which holds the DSN details: <?php //Database Parameters define(‘DB_HOST’, ‘localhost’); define(‘DB_USER’, ‘user’); define(‘DB_PASS’, ‘pass’); define(‘DB_NAME’, ‘testdb’); When I was using this class to connect to the db, everything worked. <?php class Data { private $dbHost = DB_HOST; private $dbUser = DB_USER; private $dbPass = DB_PASS; private $dbName = DB_NAME; ..

Read more

hi guys iv been pulling my hair out trying to get this code to work. i am trying to decrypt a value after a where statement looking like this below $sqlz = $this->conn-> prepare("SELECT * FROM registration WHERE CAST(AES_DECRYPT(’email’, ‘$tknz’) AS CHAR) = ?"); $sqlz-> bindValue(1,$email, PDO::PARAM_STR); $sqlz -> execute(); $rowz = $sqlz->fetch(PDO::FETCH_ASSOC); but everytime ..

Read more

I am trying to decrypt a value after a where statement looking like this below $sqlz = $this->conn-> prepare("SELECT * FROM registration WHERE CAST(AES_DECRYPT(’email’, ‘$tknz’) AS CHAR) = ?"); $sqlz-> bindValue(1,$email, PDO::PARAM_STR); $sqlz -> execute(); $rowz = $sqlz->fetch(PDO::FETCH_ASSOC); But every time I try to run this section I get the below error Fatal error: Uncaught ..

Read more

i have a PDO BindParam form, in the front page, and i want to people add multiple images, But i have some problems,i’m new to PDO and can’t solve. I have tried this type of code if (isset($_FILES[‘image’]) && $_FILES[‘image’][‘size’] > 0) and others similiars, but can’t put working, if i create a normal sql ..

Read more