Questions tagged as 'mysql'

2
answers

Read BLOB file of the bbdd

The point is that I have inserted a file of type BLOB in a field of my table, inside a bbdd in local. To read the file, using PDO, I created a file that creates the connection to my database and another file that is responsible for reading th...
asked by 29.08.2018 / 16:41
1
answer

Get row number sql

I've been testing for a couple of days how to get the row number of a query, and in fact I got it but when I upload the code to the server where I have my page hosted, I find a syntax error. I have reviewed the mysql versions and in local I have...
asked by 04.09.2018 / 12:27
2
answers

Print consecutive rows of the same column mysqli

I tried printing two consecutive rows of the same column with MySQLi, but I only print the same value. $result = $link->query("SELECT id_papers, name, pen FROM Papers, Pens WHERE id_papers = id_pen_papers"); // la consulta no es exactamente...
asked by 04.09.2018 / 14:50
1
answer

Obtain 5 last records in BD with CodeIgniter

I need to get the last 5 records of a table sorted by their ID, I want to know if my query is ok: public function getLastProductos(){ $this->db->select("p.*, c.nombre as categoria"); $this->db->from("productos p"); $thi...
asked by 28.08.2018 / 06:08
1
answer

Check MySQL counts to 0 with Joins

I have these four tables related to each other (ignore the relationships that go upwards). I will use a query so that you can understand the problem, which is complex: SELECT u.nombre, COUNT(fr.id_tipologia), t.nombre FROM tipologias...
asked by 28.08.2018 / 10:20
0
answers

Update BD record from a modal with javascript

Good I am doing modifications of the Bd from manners. I have everything done but it returns an error that I could not do the update, any suggestions ??? The data to the modal sent them like this: <script> $(document).ready(fun...
asked by 16.08.2018 / 00:31
2
answers

How to insert value of an array with $ _SESSION in mysql?

Hi, I have a SESSION variable that contains this data (id, name, quantity, price) is a shopping cart, so when I bring this variable with all the content to my other page I do not know how to insert the amount that this array in the specific fiel...
asked by 13.08.2018 / 03:23
1
answer

How to get a response from a php to angular

I have a problem that when I run my php file, a json returns to me and I want this answer to be angular. But he does not read it to me. This would be the php file: <?php try{ $conexion = new PDO('mysql:host=localhost;dbname=prueba','root',...
asked by 31.08.2018 / 21:17
0
answers

Comment system for news

I am developing a web page with MySQL and PHP, I have a news section where each one can receive comments. These comments can also be a response to another comment. For this I use a table in the database with the following structure Create tabl...
asked by 08.11.2018 / 04:42
2
answers

stored procedure does not return response [mysql]

Hello all good morning, I have to do a search in a form of c #, for this I have a procedure stored in MYSQL that will show the results of a certain word entered in a textbox, the issue is that the sp does not return any result, the procedure cod...
asked by 14.08.2018 / 17:27