Questions tagged as 'sql'

1
answer

PDO Help Using MySQL

I am having trouble connecting to the database using PDO, I use MySQL. When I run the connection to the database, the following error messages appear:    Fatal error: Uncaught exception 'PDOException' with message 'in C: \ wamp64 \ www \ p...
asked by 24.11.2016 / 21:52
1
answer

Problems generating a table [closed]

I'm having a hard time making a table. Could someone make a table that shows the times an employee did during the month? the idea would be to show the beating of employees during the month. In my bank would have the table that would keep thes...
asked by 27.06.2016 / 21:57
2
answers

Many-to-many relationship between multiple tables

I know that between two tables in a many-to-many relationship 'we need' (not mandatory but facilitates) a third table pivot which is what conventionally relates the ids of one to the ids of another. So far so good. So for example to make a gen...
asked by 18.06.2016 / 12:56
1
answer

SELECT complex with five + tables

Well, good evening. I am developing a search system, and the query must be performed on ALL existing tables. It turns out that for each type of result there is a presentation, for example: if($cat == 'a'): echo 'mostra isso'; elseif($ca...
asked by 07.07.2016 / 03:20
1
answer

How to create method in C # to do insert of SQL Query 2? [closed]

How to create a method in C # to insert data, this method make more than one INSERT one behind the other? Because I tried here and it did not work!     
asked by 08.07.2016 / 13:54
2
answers

Doubt with DROP command COLUMN sql server

I tried to delete a column from a database, I noticed that there are restrictions. ALTER TABLE dbo.TB_ESTRACAO DROP COLUMN MULTIPLIER I get a message, how can I resolve this? Thanks!    Message 5074, Level 16, State 1, Line 1   The obje...
asked by 24.07.2016 / 01:48
1
answer

Add sql query value to variable dynamically

I have a table (officials), where I want to get the value of the id_funcao, id_porcentage and put in that variable $ percentual. I do not want to just put the 30%, but rather the values in the Percentage table. $datainicio = $_POST["inicio...
asked by 22.07.2016 / 20:43
1
answer

Repeated data with GROUP_CONCAT

I'm having a problem when I make a SELECT in my DB, I'm using GROUP_CONCAT to concatenate the phone and email column but I'm getting repeated data. Here is SELECT : SELECT contatos.cont_id , contatos.cont_firstname...
asked by 10.06.2016 / 06:23
2
answers

Send SMS via PHP

I have an SMS gateway that receives the data from my form in this pattern: <?php include "smsGateway.php"; $smsGateway = new SmsGateway('[email protected]', 'password'); $deviceID = 1; $numbers = ['+44771232343', '+44771232344']; $message...
asked by 18.07.2016 / 16:22
1
answer

Create user using a function

Someone could help me, she gets error when saving '-' Error (19.5): PLS-00103: Encountered the symbol "CREATE" when expecting one of the following: (start case declare exit for goto if loop mod null pragma raise return select select update wh...
asked by 25.05.2016 / 18:58