Questions tagged as 'mysql'

1
answer

Query get Records between an initial and a final hour

I am trying to make a query to validate if a specific appointment already exists, since in the same period of time no other appointment should be generated. For this I consult the date of the appointment, the initial hour of the appointment and...
asked by 16.03.2018 / 04:21
1
answer

How can I insert a sale using Laravel Eloquent?

How can I insert a sale by obtaining an instance of both models: ('departments', 'people'), with relationships of eloquent.     
asked by 01.02.2018 / 21:24
3
answers

mysqli and php query does not work

I want to show a certain number of "products" on the screen, I create a series of bootstrap letters to store the information there. I generate my connection (I clarify that the connection is perfect): <?php $conexion = mysqli_connect("lo...
asked by 17.04.2018 / 06:27
1
answer

Count rows - judgment result in the query

I need to count the rows that result in this statement (it works correctly and I know it returns a single value): SELECT comp.descripcion FROM componente AS comp, pieza AS pza, pieza_equipo AS pzaequip, equipos AS equip WHERE comp.codigo = p...
asked by 16.04.2018 / 18:11
2
answers

Problems with a Query in wordpress

I'm doing a function to bring some courses for that I have a post type where I charge the courses and a taxonomy of marks that I assign to which course they belong to show this I have a section that is a filtering where I have to tell you which...
asked by 16.04.2018 / 20:06
3
answers

I can not update a field in my MySql database from Java

Hi, I'm having a problem when updating a field in my database, it does not throw me any errors, it just does not update the field in the database. I have the Product Class and a constructor that is as follows: public Producto(String strNomb...
asked by 29.12.2017 / 16:41
1
answer

ERROR mysql_num_rows () expects parameter 1 to be resource, boolean given

I have an error in my code: $conexion = connect::con(); $compro_cod = "SELECT * FROM producte WHERE codprod = '$codprod'"; $existe = mysql_query($conexion,$compro_cod); if (mysql_num_rows($existe) > 0){ print_r('Error: Ya existe ese...
asked by 28.12.2017 / 18:17
1
answer

mysql duplicate field value

The fact is that I want two specific fields of different tables and with different names to have the same value continuously, without having to do querys, that is, as if one were the image of the other. Could I do it?     
asked by 22.01.2018 / 10:25
2
answers

COUNTING ON MYSQL RELATED TABLES

I have two related tables ( Computers and Companies ). Computers (the company column refers to the companies table.) Companies Using MYSQL, I want you to show me the result of how many computers there are in those compan...
asked by 27.11.2017 / 00:00
2
answers

Differentiate columns using inner join

I have this code: $getAlumno = mysqli_query($con,"SELECT * FROM alumnos INNER JOIN modulos ON alumnos.nivel=modulos.ID WHERE alumnos.ID='$login'") or die ('error al obtener datos de alumno'); $row = mysqli_fetch_array($getAlumno,MYSQLI_ASS...
asked by 06.12.2017 / 08:04