Questions tagged as 'php'

1
answer

Store image in MySQL database [closed]

I find the situation that, I have to show through a query to a MySQL database in the cloud an image in an android tlf, through a PHP file. The doubt is that I do not know which is the best or easiest way to do it, if saving the image as a blo...
asked by 02.02.2018 / 11:17
2
answers

Visitor / user permissions

Generate the following comparison : <?php if($_SESSION['id_nivel'] == 1 || 2){ ?> <div class="col-md-6"> <select name="cantidad" class="form-control"> <option class="form-control...
asked by 01.02.2018 / 14:58
1
answer

Time it takes to load a table with Datatables

I was doing tests with a table with 2,000 records and datatables worked fine, now I change it with another one that has 16,000 records and after 7 seconds gives error. In the debugger I see that the select became complete (the 16,000 records)...
asked by 06.02.2018 / 17:04
1
answer

Problem with number_format when saving in mysql

I have a problem with storing numbers with decimals in mysql. It turns out that to show it in an input I convert the amount to Spanish format with thousands separated by. and decimals for, and I do it like this: number_format($Precio,2,",",...
asked by 06.02.2018 / 11:43
2
answers

Php for / switch

What the function does is show a warning on the screen with the user name and a link to your profile, after a few seconds the notice is closed. What the switch should do is show the information of the user 1 and at the end of the animation sh...
asked by 05.02.2018 / 20:29
1
answer

Login with Value Objects without using all the fields in the table

I'm doing a login and in VO I use setter and getters . In the DAO when doing the query I only invoke three fields, but when trying to record it in the object UsuarioVO shows me    Fatal error: Uncaught...
asked by 06.02.2018 / 03:24
1
answer

Enter $ value to a field and depending on the value, modify another field

I have two columns:    stock = string "yes" or "no" And the other column with amount:    stock_c = value 0 to 100 (limit 100) Use utf8_general_ci collation and the columns are in the products table What I want to achiev...
asked by 27.01.2018 / 18:35
1
answer

Select certain MySQL table rows

Well, I have the following code: function dameTodosLosProyectos( $con, $cantidad = 0 ) { if( $cantidad > 0 ) { $query = "SELECT * FROM proyectos LIMIT $cantidad"; }else { $query = "SELECT * FROM proyectos";...
asked by 06.02.2018 / 11:49
1
answer

insert in database with php and html

I am mediating a nav-item (bootstrap) by saving data in a database using a php file, but at the time of saving the data the php file is opened and I would like it to be executed only without it being opened, that is, that only makes the insertio...
asked by 27.01.2018 / 18:14
2
answers

Bootstrap & Jquery Modal Window - Update content

I am creating a website where clicking on a button opens a Modal window where it shows a series of images. In each of those images there are the download and delete buttons. By clicking on delete I do not know how to make that image...
asked by 29.01.2018 / 11:15