Questions tagged as 'mysql'

1
answer

Like SQL with multiple fields [closed]

I want to make a select for a search of five fields (job title, training, sex, schedule, photo). But it's not working. Could someone tell me the reason? <?php $cargo = $_POST['cargo']; $formacao = $_POST['formacao']; $sexo = $_PO...
asked by 01.06.2015 / 20:59
1
answer

I created a registration system using PHP + MySql there at the time of execution it asks to replace MySql with MySqli ... Which ones should I replace?

<?php $host = "localhost"; $user = "root"; $pass = ""; $banco = "dbcadastro"; $conexao = mysql_connect($host, $user, $pass) or die (mysql_error()); mysql_select_db($banco) or die (mysql_error()); //mysql_connect_banco($host, $user, $pass); ?&...
asked by 12.05.2015 / 13:34
1
answer

Recording a list from an Option

I have the following code: echo "<select id='posto[]' name='posto[]' multiple='multiple'>"; foreach ($postos as $lista) { echo '<option value=' . $lista->getCodigoPosto() . '>' . $lista->getNomePosto() . '</opt...
asked by 08.09.2015 / 03:54
1
answer

Concatenation Create Table

I'm trying to create a table from the user's email, and I'm using the code below: $email = $_SESSION["email"]; echo $email; $create=mysql_query("CREATE TABLE userpics_'$email' (id_user VARCHAR(60), id_pic VARCHAR(200), id_tipo INT(2))");...
asked by 21.04.2015 / 21:50
1
answer

How to modify a daily statement for a monthly statement?

I have a table that is not in normal database forms, but has old data that I need to get. I managed to get you to submit the daily statement, but now I need to modify it to generate the monthly statement in the following query: SELECT dia,...
asked by 08.09.2015 / 04:46
1
answer

How to count total of multiple type records in a single query in sql

Hello Today I'm doing the registration counts this way $sql1 = "SELECT COUNT(*) AS total1 FROM a_finan Where cat = 'Ativos' ; $resultado1 = mysql_query($sql1) or die ("Erro na consulta1"); $linha1 = mysql_fetch_assoc($resultado1); echo $total...
asked by 16.04.2015 / 16:44
1
answer

Choose database table for logged in user

I want to choose only 1 table from a database, depending on the user who is logged into the website. I want this because I'm making an account management page for site users. On this page I have a calendar (fullcalendar) where I will fetch event...
asked by 23.04.2015 / 11:57
1
answer

Mysql table locked

When trying to query the table via phpmyadmin there is no return and it gets stuck. Not even trying to do a query with php it returns. Any suggestions to solve?     
asked by 24.04.2015 / 22:07
1
answer

Problem with catch in MySQL connection c #

Hello, I'm a beginner in programming and I'm having trouble connecting MySQL in C #, where the code does not check and goes into the catch action. Here is the code: conexaoDataSet = new DataSet(); conexao = new MySqlConnection("SER...
asked by 25.04.2015 / 17:30
1
answer

Different divs in loop

I find the following problem, with the code below I wanted to add more fields without repeating divs . Code: <? foreach($itens as $myrow){ ?> <div id="LISTA1_FUNDO_PRETO"> TITULO<...
asked by 24.04.2015 / 02:08