Questions tagged as 'mysql'

1
answer

Should I avoid injecting "%" into a query where I use "LIKE"?

I have a page where I consult the user through the name. The query aims to use LIKE to capture the user name from the first letter onwards. So I do the query this way SELECT * FROM usuarios WHERE nome LIKE 'Gu%' I'm using Larav...
asked by 17.09.2015 / 17:07
2
answers

Retrieve information combobox PHP

I want to insert the contents of the combobox into the database via POST, but I can not. Here is the snippet of the combobox, which pulls the data from a table <select name="cmbtimes"> <?php //pegando os dados while($dados = my...
asked by 08.09.2015 / 20:42
2
answers

NULL value in database x performance

I have always used a MySQL database for small projects and I never cared about the option "NULL when it is empty", that is, it was blank. Now I'm designing a large system, I would like to know the concept of using NULL value when the f...
asked by 21.10.2015 / 19:31
2
answers

How to make a form that accepts photo upload and save to the database

I created a database named Form and table with the following information contatos (id int A.I, nome varchar(30), idade int(2), foto(blob) I made that default form: <!DOCTYPE html> <html> <head> <meta charset=...
asked by 02.10.2015 / 14:42
1
answer

Problems connecting to the Mysql database

I'm trying to create a system for college, however I'm having an error while trying to connect with Mysql, I'm using PHP and Xampp. Error:    Fatal error: Call to undefined function mysqli_conect () in   C: \ xampp \ htdocs \ Courses \ Tes...
asked by 10.05.2015 / 07:49
1
answer

Insert into the database by recording in half

I get the name of the news and insert it in another table, but one of the fields is going in half, follow the image of print : Database Sourcecodewhereyousend:<inputname="nomenoticia" type="hidden" id="nomenoticia" value="PC realiz...
asked by 15.03.2015 / 19:29
3
answers

How to put zero or null in a SQL query of a date range, for those whose value does not exist?

Formulate the question was a bit difficult, but I'll try to be as explicit as possible using an example to set the question straight. There are the following data in my table: Thepurposeistoexecuteaquerysql(theDBMSusedisMySQL)inthedaterang...
asked by 25.09.2014 / 13:36
1
answer

How to perform a paging with PDO?

I'm developing an application in PHP but I just started in PDO and I have no idea how to make a paging using it. I was able to set up a small query with example of the information to be printed and would like an help to f...
asked by 03.10.2014 / 18:00
1
answer

Procedure with IF NOT EXISTS

Hello stackoverflow developers, I started to delve into sql commands a short time ago, I'm having some kind of syntax error with this procedure, but for a number of attempts, I could not fix it, follow the code there, I'd be very grateful if can...
asked by 29.09.2014 / 01:10
2
answers

EntityFramework, Migrations and MySql. Schema name being misinterpreted. How to solve?

I'm having a problem using migrations with MySql . When I try to create the first version with Migrations it is making the schema / bank name part of the table name: public partial class Initial : DbMigration { public override...
asked by 03.07.2015 / 00:38