Questions tagged as 'sql'

0
answers

Executing a Procedure within a Function or Select

I need to register every time a SELECT is run on my system, if the user is logged in, this process would be done inside my ERP that allows this type of Customization, however I tried within SELECT to insert a function to call a procedure that do...
asked by 25.04.2018 / 20:31
4
answers

Show column sum of the logged in user. error

Good morning, someone help me? I do not understand much of php, but for me to finish my site there is only one thing: I need to post the sum of the values that are in the table but based on the logged in user, already tried in all the ways but I...
asked by 20.04.2018 / 16:50
0
answers

How to search user login to search data in database?

Good night guys, I'm using this command line, it worked fine with me typing the person's login, but when I try to go based on 'user_login' the page does not even load when I try, I already tried to use it here: $current_user = wp_get_current...
asked by 23.04.2018 / 00:52
0
answers

How to add the value of a User_ID to an FK?

Hello ... Well, assuming a user wants to comment on a post. The system should: Verify that the user is logged in, otherwise he will receive a script "You must be logged in to comment". If the user is logged in, then he should get the...
asked by 17.04.2018 / 03:34
0
answers

How to pass the variable in postgres using dbblink

Oops, good morning! I have the following query in postgres: declare $1 VARCHAR; BEGIN IF (SELECT COUNT(*) FROM tempo2 WHERE looping IS NULL) > 0 THEN $1 = (SELECT banco FROM tempo2...
asked by 17.04.2018 / 15:51
1
answer

php foreach multilevel menu

Hellofriends,howareyou?IhavethefollowingproblemIhavethisdatabaseneedtocreateamenuwithmultilevelforthesiteblog,Icreatedonewiththefollowingcode:<ulclass="nav navbar-nav" style="display: block;"> <?php $catsPassadas = arra...
asked by 17.04.2018 / 16:04
0
answers

Create GRANT with condition

I have a table CONDUCTOR (columns: name, cnh, address, portfolio_points) and a GRANT analyst. The analyst can only access data from drivers who have more than 0 points in the portfolio. Grant select on driver to analyst with GRANT OPTION;...
asked by 18.04.2018 / 20:50
0
answers

FireBird gets lost with two indexes with Date fields

I have SELECT relating two tables with INNER JOIN , in each of the tables I have about 600,000 records. In the main table of SELECT , I have two fields of type Date . None of the fields have null values, and there are in...
asked by 18.04.2018 / 20:35
2
answers

Select last record from a table - sql

Good afternoon! I have a table with multiple records for multiple patients. I need to bring only the last record of each patient. For example in the table: REG PACIENTE TITULO DATA 1000 joão...
asked by 18.04.2018 / 20:41
0
answers

I wonder if this delete user function is correct?

$data = file_get_contents("php://input"); $objData = json_decode($data); $id = $objData; $db = new PDO("mysql:host=mysql.hostinger.com.br;dbname=u460090852_aula", "u460090852_ionic", "123456"); if(isset($id) && $id !...
asked by 18.04.2018 / 16:40