Questions tagged as 'mysql'

3
answers

Error in SQL statement, in MySQL Workbench

I'm doing two exercises from Workbench . The exercise asks to create a table called CLIENTS with the following fields: cod : size 5 integer filled with zeros, does not accept nulls. name : variable text of 30, does not accept nulls....
asked by 30.01.2017 / 17:49
1
answer

configure time zone JDBC driver java

I present an error when executing my code from the persistence part which is the following Exception in thread "AWT-EventQueue-0" javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140...
asked by 11.02.2017 / 04:55
3
answers

Problem with fetch (PDO :: FETCH_ASSOC)

I have a small login form, with the variables $ user and $ password that have the correct values, the problem is that it gives me    Fatal error: Call to a member function rowCount () on boolean that is, as if the array were empty and I h...
asked by 06.11.2016 / 18:31
2
answers

ALTER TABLE with new column that is foreign key MYSQL

I need to add a new column in one of my tables, but this column in turn is a foreign key from another table but I do not know how to do it ... I tried this but evidently gave me an error: ALTER TABLE ordenes ADD COLUMN ticket varchar(50) FO...
asked by 07.11.2016 / 17:07
1
answer

I have a problem when I give my button Save or Insert my form, since it does not save me or present me with any error, I do not know what to do

This in the Order that I'm giving to my save button, so that I save the data in my database called Patient. I can not find which is the reason, when I click on the button it does not do anything to me, it's as if I did not receive the order. u...
asked by 17.08.2017 / 17:16
4
answers

Obtain the maximum value of a database

Good afternoon, I'm trying to capture a value from my database through a query but this gives me an error, the code is as follows: $consultarRepresentante = mysqli_query($conexion, "select max(id_representante) from representantes")...
asked by 19.11.2016 / 19:13
3
answers

How to take a variable and declare it in each function with php?

I have a variable defined $sql which has as value a statement sql the problem is that I need the same statement in different functions, but I do not want in each function to have to put $sql = "SELECT * FROM....." but direct...
asked by 26.04.2017 / 15:12
2
answers

Select 3 tables mysql

I would like to know how to do to bring the records of 3 tables in mysql: Tabla1 ->Causa|Fecha|Tipo|Usuario Tabla2 ->Causa|Fecha|Tipo|Usuario Tabla3 ->Causa|Fecha|Tipo|Usuario And I would like to bring a single listing Causa|Fec...
asked by 15.05.2018 / 18:55
3
answers

SQL Count records that begin with xxx

I want to count the records in column 1 that start with 123, I need to count multiple times, with different values (123, 657, 897, ...) I have the values in column 2 - column1 | column2 - 1234567 | 123 - 5489186 | 135 - 1238756 | 548 SELE...
asked by 14.03.2018 / 11:15
1
answer

RETURN DATABASE IMAGE AND SHOW ON BROWSER

I would like you to help me with a little doubt that I have, is it possible to save images in databases and return them to the browser but that works as if you were reading only the image? I hope you have understood me, just here I leave an exam...
asked by 11.12.2018 / 18:52