Questions tagged as 'mysql'

0
answers

turn procedure into function

I'm trying to turn this procedure into function , so I can use it inside another procedure , but I can not evolve: CREATE PROCEDURE bancodados.sp_calculo(param_id_cnpj varchar(14)) BEGIN SELECT id_cnpj, AVG(v...
asked by 13.11.2016 / 13:41
1
answer

Error 403 - access forbidden in password validation with Mysql in PHP7 code, how to fix?

Good afternoon guys, I'm taking a course on a PHP real estate portal system that I bought and I packed up for the portal login system. The course uses PHP below version 5 and the instructor uses the automatic login script generation in msql from...
asked by 13.11.2016 / 00:03
1
answer

How to capture more than one attribute from a foreign key?

I'm doing a Java-Desktop Vehicle Lease project. I am using MVC, DAO and JDBC. In my bank I have the Rental and Car tables: CREATE TABLE IF NOT EXISTS 'frota'.'carro' ( 'idcarro' INT(11) NOT NULL AUTO_INCREMENT, 'chassi' VARCHAR(45) NULL...
asked by 01.02.2017 / 16:13
1
answer

Use dropdown select in autocomplete of search in php mysql

I have this input=[text] with autocomplete that offers the title with a link (a href =) in the mysql database, however I would like to create 'categories' to select the links that autocomplete offers through a dropdown select. / p> This...
asked by 01.02.2017 / 13:13
2
answers

Search with LIKE or MATCH..AGAINST in two columns

I have a classified system where I search with PHP and MySQL using LIKE in two fields: campo1 like '' or campo2 like '' The problem is when I look for something like "Green car" it does not display anything for "car" being contained i...
asked by 16.04.2014 / 20:26
1
answer

How to display results if my select gives false?

And I'm having the following problem, there are two tables POSTS and TOPICS, one topic has several posts, and I'm displaying the topics ordering by the most current date of the post of the topic, only that when creating a new topic it does not d...
asked by 12.11.2016 / 18:59
0
answers

MYSQL query error

I have the following query select DISTINCT(p.id),g.id, p.slug, p.nome from game g join game_plataforma gp on g.id=gp.id_game join plataformas p on gp.id_plataforma=p.id group by g.id,p.id,p.slug, p.nome order by g.id DESC limit 5; She retur...
asked by 19.11.2016 / 23:09
0
answers

Using Store Procedure for User Authentication

I have the following Store Procedure in my MySQL database, SP_Autentica : BEGIN SET @id = (SELECT ID FROM userdata WHERE Username = user AND Password = pass); END In ASP code, conn.asp : connectstr = "Driver={MySQL ODBC...
asked by 11.11.2016 / 01:37
0
answers

How to search a single field of 3 tables with JOIN using Respect \ Relational?

I'm starting to use the Respect\Relational framework and I was just trying to fetch the names of the letter templates that belong to the id 1 business line, but all the forms I've tried always return all the columns. What would be the cor...
asked by 10.11.2016 / 20:50
0
answers

It takes time to execute SQL commands

I have a system where I work with a db online hosted on JustHost.com. I suffer with the delay in the executions of the commands, but not always these delays exist, sometimes a command takes less than 1s and another time this same command...
asked by 30.11.2016 / 20:24