Questions tagged as 'pdo'

1
answer

My SQL Query does not work correctly?

I have a system that uses dates for logging and I separate the date by an arrays-formed explode and register them in a database, but when I do the query it looks for them in order, the order stumbles. Following code examples - >...
asked by 14.11.2018 / 02:49
1
answer

Doubt about alternative to decrease code size and make fewer queries

I have a question concerning a certain part of a system that I am developing. The system is for management of a higher education institution and has a page that is to manage the courses of the institution and I put some filters via select with a...
asked by 15.07.2017 / 16:04
1
answer

"Call to undefined method mysqli_result :: fetchAll ()" in PDO [closed]

The following code has an undefined method error on the line:    $result = ($exec!==false)?$exec->fetchAll(PDO::FETCH_ASSOC):$exec; public function getConnection(){ global $conn; $this->conn = $conn;...
asked by 14.03.2016 / 21:51
1
answer

How to delete data from multiple tables at the same time?

Personal security I decided to use Transaction, I hope it works like this: Conclude only if all querys are running. Do you suggest something better? <?php if (isset($_GET['deletar']) && $_GET['deletar'] == 'sim'): $lojista...
asked by 04.01.2017 / 01:54
1
answer

Problems with error when creating file logerro.txt

Notice: Undefined variable: strErro <?php class DB{ private static $conn; static function getConn(){ if(is_null(self::$conn)){ self::$conn = new PDO('mysql:host=localhost;dbname=sllapsocial','root',''); se...
asked by 05.10.2014 / 05:29
1
answer

conversion error from my_sql to PDO

I modified my connection page with the MYSQL database for PDO but it is showing error, could anyone help me? There is a file that pulls the necessary information from the database to be sent to the index of my site and presents the last 5 commen...
asked by 12.10.2016 / 18:40
1
answer

Error loading PDO extension

I transitioned my site using magento but in the new server it accuses the following error:    The PDO extension is required for this adapter but the extension is not loaded Note: I have reconfigured php.ini.     
asked by 25.04.2014 / 20:57
1
answer

SQLSTATE [HY093]: Invalid parameter number: parameter was not defined [duplicate]

   0 /opt/lampp/htdocs/renan/conexao.php(53): PDOStatement-> execute (Array)    1 /opt/lampp/htdocs/renan/conexao.php(72): ConnectionDatabase-> execute (Object (PDOStatement), Array)    2 /opt/lampp/htdocs/renan/pdo_acao.php(122): ConnectionDa...
asked by 25.08.2015 / 21:43
1
answer

nav pills bringing mysql info in pdo

<div class="video-sec"> <h4 class="heading-small">Mídias</h4> <div class="video-block"> <ul class="nav nav-pills justify-content-center mb-4" id="pills-nav" role="tablist"> <?php // Atribui uma con...
asked by 17.11.2018 / 21:07
1
answer

Get the data related to more than one table, separately?

I can not do this at all. It seems to be with the join, but when I try, it returns zero records. I have the tables: TB1, TB2, TB3, TB4, TB ... etc All with PK (ID) I tried this code: SELECT ID FROM TB1 inner join TB2 on (TB1.ID = TB2.ID)...
asked by 27.08.2018 / 15:43