Questions tagged as 'mysql'

1
answer

Make a merge between multiple databases

I have a canteen system that performs sales in different schools. This system only works online, saving the sales movements in the array server (MS SQL). To optimize the system, I would like to work with it using a local base, so it would work e...
asked by 05.02.2016 / 12:50
1
answer

Error verifying result of variables with else and if

I'm having a problem with returning an authentication message on a login page. Specifically and where it verifies that the login and password field are checked as TRUE, if yes and the user does not contain in the database it will return "invalid...
asked by 20.04.2016 / 01:34
2
answers

Bank data return to PHP page not returning data

Good morning, guys. I have a page (index.php) that needs to return the database data to it. I have a .php (connection.php) that connects to the database, see: $_SG['servidor'] = 'localhost'; // Servidor MySQL $_SG['usuario'] = 'root';...
asked by 31.08.2015 / 16:14
1
answer

Is there any way I can change data from different columns but leave it in a single variable? [closed]

In short .... Use multiple updates in a single variable Type:     $ query = 'update .....; update ......... ' Is there anyway?     
asked by 22.08.2015 / 22:23
1
answer

Error in mysql query

I'm on the clock without noticing what's wrong with my query. I would like you to give me some help SELECT 'recargas'.'valor_recarga' as saldo FROM 'contas_pessoais' INNER JOIN 'contas' ON 'contas'.'titular' = 'contas_pessoais'.'titular' INN...
asked by 26.08.2015 / 16:13
1
answer

Error to import mysql table in phpmyadmin

I'm having a problem importing a table into phpmyadmin. Table: CREATE TABLE ManterEmpresa ( IdEmpresa INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, CNPJ INTEGER UNSIGNED NOT NULL, NomeEmpresa VARCHAR(45) NOT NULL, Logo VARCHAR(45...
asked by 05.11.2015 / 15:28
2
answers

Check with IF and INNER JOIN

I have these queries in the database <?php $consulta = mysql_query("SELECT * FROM mesas LIMIT 50"); if (mysql_num_rows($consulta)==true) { while($lnmesas = mysql_fetch_array($consulta)){ $consultainterna = mysql_quer...
asked by 02.11.2015 / 06:22
1
answer

INSERT and UPDATE in relationship n: m in MySQL

I need to create a relationship n: m in mysql, follow my example: I have a table named empresas and another representantes . A company can have more than one representative, and one representative can belong to more than one comp...
asked by 15.01.2016 / 13:43
1
answer

Convention for attributes that preserve types

A table stores teachers data. Each teacher has a degree: specialist, master, doctor, postdoctor and others. Another table present in the database is posts . Each publication can (or does not) have a certain type: book, periodical, event, t...
asked by 21.07.2015 / 22:38
1
answer

avatar with user information

It is the following personal, maybe this is very basic, but how do I associate the image of a folder with images for example to the user of id 1 in the bank? Will user 1 have the image 01 of the img folder? Would you recommend creating the "fold...
asked by 17.07.2015 / 19:22