Questions tagged as 'sql-select'

0
answers

Find a record using the value of a cookie

I can not find a value in the database by a select by reference to a variable coming from a cookie : $query = "SELECT * FROM carrinho WHERE dono = '$dono'"; However, if you search using the variable text, $query = "SELECT * FROM c...
asked by 01.06.2017 / 11:20
3
answers

No select error using mysqli_query

I've done a php to list the rooms, but I'm having difficulty listing them, if anyone can help me, I would appreciate it. <?php $link = mysqli_connect("localhost","root","","hotel"); $result = mysqli_query("SELECT descricao FROM quartos WHER...
asked by 08.06.2015 / 21:53
1
answer

Duplicate Mass Records - Run a query for each displayed Record

I have a table where only accounts with their type = 'fixed' are displayed WhatIwouldliketoaccomplishistorunaqueryandduplicateallrecordsinthetableatonce.AtthemomentIonlymanagedtoduplicatetheaccountsonebyoneandnotallresultsdisplayed,whichalre...
asked by 17.04.2017 / 21:24
1
answer

PHP | MYSQL Error: Operand should contain 10 column (s) [closed]

I'm trying to develop a Query where, it needs to be queried in 6 equal tables if there is any specific value. Here's my Query: SELECT ( CASE WHEN (SELECT * FROM sala1 WHERE aluno = '$AlunoInformado') = 1 THEN END ELSE CASE...
asked by 10.01.2017 / 02:43
3
answers

No select error using mysqli_query

I've done a php to list the rooms, but I'm having difficulty listing them, if anyone can help me, I would appreciate it. <?php $link = mysqli_connect("localhost","root","","hotel"); $result = mysqli_query("SELECT descricao FROM quartos WHER...
asked by 08.06.2015 / 21:53
3
answers

No select error using mysqli_query

I've done a php to list the rooms, but I'm having difficulty listing them, if anyone can help me, I would appreciate it. <?php $link = mysqli_connect("localhost","root","","hotel"); $result = mysqli_query("SELECT descricao FROM quartos WHER...
asked by 08.06.2015 / 21:53
1
answer

SQL To Count If It Is Greater Than 1

My problem is this: I have to make a condition if the SEQ_VENDA has more than 001 NUMBER, it bring the SELECT data. And if you have only 1 NUMBER referring to SEQ_VENDA do not bring in SQL     
asked by 23.10.2018 / 15:09
2
answers

Error "expects parameter 2 to be resource" when connecting to the bank

I'm trying to make a connection via php to a mysql server but it always has the following error:    Warning: mysql_select_db () expects parameter 2 to be resource, null given in /home/u517649386/public_html/conecta.php on line 6 The code...
asked by 14.11.2016 / 23:43
1
answer

How to select N records in a select in Oracle plSQL? [closed]

I have 3 tbs, I do the following get the id of tb1 in common with tb2 and tb3 (id), then compare if field 1 of tb1 (LENGTH) is greater than field 1 of t2, in tbs 1 and 2 there are several ids of tb3, (it is necessary to go through tbs 2 and 3 al...
asked by 08.08.2018 / 21:18
1
answer

How to do Select all of the ids of a table except the first 2?

I need to make a select in mysql of all users of a table, however I can not receive the first two users of the table and I need to do this without specifying id, since when more users are registered I need the first two not to appear . I tried s...
asked by 19.11.2018 / 01:03