Questions tagged as 'sql'

1
answer

Validate form and insert into Database with PHP [closed]

Hello I'm still a beginner in PHP and I staggered by validating the contact form on my site. It completes client-side validation using Javascript, but the server side is still not completing the task, so ask for your help. I have the HT...
asked by 28.12.2016 / 02:22
2
answers

get mysql data using javascript and ajax

I'm developing a web app (if interested, follow link) and it was going alright , until I get to the part below: TheNCMfieldisainputtagwithadisabledattribute.TheinformationinsideitcomesfromanautocompletethatIused,usingAJAX,adatabasesearch.ph...
asked by 14.01.2017 / 23:02
1
answer

How to use JUNIT to test void methods of my DAO class

Hello, I have a DAO class and I want to implement tests with JUNIT, but many of the methods have a void return. Here's a piece of the class that makes up the DAO package public class ExemplarDAO { private Connection connection = null; publi...
asked by 22.11.2016 / 16:02
1
answer

Return greater value of a SQL-specific record

I need my SQL to return the largest date, but not the longest date among all records, and yes, the longest date of a specific id. I've tried to use MAX() , but it returns the highest value of all of the table, as well as a ORDER BY...
asked by 12.07.2016 / 16:30
9
answers

How to prevent SQL injection in my PHP code?

I developed a page in PHP for internal use of the company I work with and only very few people use it. You can use this page to do some queries, insertions, changes and deletions of a table in a MySQL database, however I believe that my PHP code...
asked by 03.02.2014 / 13:37
2
answers

Query with dynamic column spring data

I need to perform a select using the @Query of spring data, however I need to pass the column name by parameter Example: @Query("SELECT g FROM Grupo g where g.? = ?") Page<Grupo> findTeste(String campo, String valor); To call meth...
asked by 22.08.2016 / 14:37
2
answers

Numeric Overflow with Numeric (18,7) in Firebird

I need a precision of 7 houses in a given split calculation, but when the divisor is too small, it generates an extended number. When I try to cast, it gives numeric overflow, even the number "fitting" in the cast. The sql is as follows: selec...
asked by 11.03.2016 / 16:01
1
answer

How do I check for scheduling at a time interval?

I need to create a schedule where I allocate a service provider to work for a client.    Eg: The Service Provider John will provide services to the customer    condo valley of the sun on the day March 15, 2016 from 10:00 am to 12:00 . J...
asked by 14.03.2016 / 19:54
1
answer

How to show result between 3 tables?

I have these three tables; table_1 |---------------------| | ID1 | name | |---------------------| | 1 | 'xxxxx' | | 2 | 'xxxxxx' | | 3 | 'xxxxxxxx' | | 4 | 'xxxxxx' | |...
asked by 21.03.2016 / 15:21
2
answers

Create a script to check if the table has a primary key

I need to create a script to check if a table has primary key , if it does not, it is added to primary key . I found this form to do the script, I did not understand where it takes the name of this table "INFORMATION_SCHEMA.TAB...
asked by 26.11.2015 / 18:06