Questions tagged as 'mysqli'

1
answer

Call to a member function fetch_object () on a non-object

In the following code, the following error occurs, which I can not understand why:    Call fetch_object () on a non-object on line 21 <?php require('config.php'); if (isset($_POST['email'])) { $email = stripslashes($_REQUEST['emai...
asked by 21.05.2017 / 18:58
1
answer

Get month from datetime field mysql

Colleagues, I have a table where it has the datetime () field of Mysql. I would like to get a particular month directly from the where clause. By PHP I know how to do it, but how would I do it directly through the query? I tried this way to g...
asked by 03.05.2017 / 20:28
1
answer

Doubt JSON PHP

I'm trying to display a JSON structure that will be built by MySQL , but I would like to separate the results into groups according to the field names I set in select and would like something like: minha_array carro carro 1...
asked by 09.05.2017 / 21:15
1
answer

Select limiting query, and does not display the last queries

In this script, it is limited to displaying 6 queries in SELECT in the variable $ amount_pg = 6, I used the IF to inform that all news situations other than 2 (unpublished) should be displayed. Home The detail is that in my SELECT, in order of c...
asked by 09.05.2017 / 21:18
1
answer

The publications are getting on the last page in the PHP MYSQLI

Good evening. Does anyone help me in a problem I'm having? Well ... I did a paging system, but when I add more data in the database, the new data stays on the last page instead of the first one, does anyone know how to revert it? <?php...
asked by 19.04.2017 / 03:26
1
answer

How to resolve Access denied for user '' @ 'localhost' (using password: NO)?

. Remembering I use the server in MAMP and my OS is OSX. In the index.php file $db_host = "localhost"; $db_user = "root"; $db_pass = "root"; $db_name = "exemplo01"; no model mdl_user.php <?php //função criada que deve ser u...
asked by 03.04.2017 / 03:00
1
answer

SQL query to return only filled records from the table

How do I make my query return only records that are filled in? My table has some blank records that are returned by the association. <?php $consulta = $pdo->query("SELECT * FROM ws_so_wind, ws_soft_gallery WHERE id_soft = id_img AND id_s...
asked by 04.04.2017 / 16:04
1
answer

Difficulty in adding PHP data MYSQL

Well, the title itself is already self-explanatory. Perhaps the only relevant detail I can add is the fact that when I perform the operation I do not receive any errors or warnings. Thanks in advance for the answers. <?php i...
asked by 08.05.2017 / 00:33
1
answer

Equipment registration form with batch number sequence [closed]

Someone could help me with this problem. follow the code: <?php $equipamento = $_POST['equipamento']; $departamento = $_POST['departamento'];   $observacao = $_POST['observacao'];    $NInicial = $_POST['NInicial'];     $NFinal =$...
asked by 28.02.2017 / 21:09
1
answer

Gallery of images with Carousel Boostrap. name.jpg separated by, no db!

I want to create a gallery of images using the bootstrap carousel, when saving the multiple images in db they go to the same "photos" column and are separated by "." (foto1.jpg, foto2.jpg, foto3.jpg) now I wish to display them in with the carous...
asked by 14.04.2017 / 21:44