Questions tagged as 'mysql'

0
answers

How to make an increment of one value every 3 inserted records?

Greetings, my problem is that every 3 inserted records I must make an increase in value, example: I have my table details_quotes in which I keep the amounts of each quota according to an established amount, but every time you insert 3 records yo...
asked by 12.08.2017 / 23:02
1
answer

How to receive a Variable Type DateTime from MYSQL in PHP file

Friends, my intention is to receive the value of a type = datetime field from MYSQL in a php file $sql=mysqli_query($con,"select fecha FROM tabla1 WHERE campo1=1"); $rw=mysqli_fetch_array($sql); $fecha_que_recibo=$rw['fecha']; The d...
asked by 13.08.2017 / 03:40
1
answer

How to perform Querys that show a data of the row of the related foreign key?

Good afternoon I have a problem with Mysql, I need the query to the invoice table that I'm doing, show me the name of the IDs of the foreign keys that I have represented, for example: INVOICE TABLE IdFactura 1 IdPersona 6...
asked by 13.08.2017 / 00:39
1
answer

Increase in the value of records every 3 fields

I am presented the problem that when doing the INSERT I must increase the value of the amount every 3 fields, because they are quotas and every 3 installments there must be an increase of 20% of the previous amount, as you can see in the image...
asked by 12.08.2017 / 13:58
1
answer

Error while traversing a for for an insertion

[ I present a problem when inserting this data, I insert in the table costs_quotes the amount of amounts that I say, for example amount of fees: 9, good according to that number that happens you must insert that number of times the data in th...
asked by 12.08.2017 / 18:24
1
answer

Problem when inserting. Insert the same record three times!

I am inserting data in a table called payments, the table stores payments that a student has made, the problem arises that when a student enrolls for the first time to process the first payment in the payment table, two rows are saved with all t...
asked by 10.08.2017 / 23:01
0
answers

Do I need to know how to resolve this response from a go daddy server on my local server works with the code below?

500 - Internal server error. There is a problem with the resource you are looking for, and it can not be displayed. this is the connection to the database <?php $conexion = mysqli_connect("localhost", "root", "contraseña", " nombre bd"...
asked by 10.08.2017 / 19:00
1
answer

Do a between of 2 columns codeigniter

Normally I have made a between on a same column example: $Where['autos.precio>='] = 200; $Where['autos.precio<='] = 300; $this->MainModel->listar('autos',$Where,''); That would bring me all the cars in a price range of 200-30...
asked by 10.08.2017 / 16:23
0
answers

How do I insert a default or null value in Mysql?

I have a form, they are around 50 fields, but the point is that sometimes the user will only fill 10 or 20 fields, they are not always 50, then I had the required in my forms and I removed it, so that it was no longer mandatory to complete al...
asked by 05.08.2017 / 01:21
1
answer

Increase sql field by pressing HTML button using PHP

I'm doing a website with PHP and HTML in which users upload photos with a title, an address, location and a description. In addition, there is a button to vote on said photo. The problem I'm having on that button. I can not get the SQL fie...
asked by 06.08.2017 / 00:04