Questions tagged as 'mysql'

2
answers

Number of "bound variables" does not match the number of "tokens"

I made some changes to the script and it is generating two errors: Warning: PDOStatement :: execute () [pdostatement.execute]: SQLSTATE [HY093]: Invalid parameter number: number of bound variables does not match number of tokens in /localhos...
asked by 29.05.2014 / 04:58
2
answers

which SQL command would display the records where the LastName field is "Duck" and the date in the BirthDate field is greater than 01/01/1950?

Given the table, what SQL statement would display the records where the LastName field is "Duck" and the date in the BirthDate field is greater than 01/01/1950?     
asked by 30.08.2014 / 01:36
2
answers

Query by movement

I have a table that records steps of a move. For example:    Date - Movement - Product 2018-30-10 - produced - id1   2018-30-11 - packed - id1 2018-30-12- dispatched - id1   2018-30-10 - produced - id2 2018-30-10 - produced - id3   2018...
asked by 31.10.2018 / 21:22
2
answers

Converting two MySQL selects to one

I have a small question about MySQL. I have the following MySQL query: sq1 = mysqli($conexao,"select * from tabela1"); $tr1 = mysqli_num_rows($sq1); Then I make the famous loop: for ($i=0;$i<$tr1;$i++) { $registro1 = mysqli_fetch_a...
asked by 31.07.2016 / 16:56
1
answer

How to insert emoji character in a TEXT field of MYSQL?

I have a text editor. In this text editor, save the information in a table, using a column of type MEDIUMTEXT . When I tried to insert an emoji, the following error appeared:    Incorrect string value: '\ xF0 \ x9F \ x98 \ x83 \ xF0...
asked by 23.08.2018 / 14:50
1
answer

Using $ this when it is not in object context

I'm trying to create a class in PHP that connects to the MySQL database and I'm getting the following error:    Fatal error: Using $ this when not in object context ConnectDB.class.php class ConnectDB { public $pdo; private $dri...
asked by 24.09.2018 / 22:25
1
answer

Type of relationships 1: 1

Because when I was to redo the relationships in my table 1: 1 I get two types in WorkBench 1: 1 --------- 1.1_ _ __ (With the dash in the middle but the straight line) What's the difference from one to the other?     
asked by 12.02.2014 / 11:55
3
answers

Downloads Counter

Could anyone help me do the following: I have a download site where I want to do a download counter for each page and that when clicked, the number of downloads on the page will be updated automatically.     
asked by 17.07.2015 / 07:58
3
answers

How to put the last row number of a MySQL table in a variable

I would like to know how to get the last row of a MySQL table, and put this number inside a PHP variable. I tried this way: require_once "../../models/conex.php"; $sql = "SELECT * FROM tabela ORDER BY id DESC LIMIT 1"; $query = $mysqli->...
asked by 19.09.2015 / 08:50
3
answers

Create folder and ID simultaneously using the same id number

I need to create a folder with the same ID number as the user inserts a new article. <?php include './includes/config.php'; setMenu("Notícias"); include './includes/cabecalho.php'; checkLogin(); $erro=""; if ($_POST['salvar']) // notici...
asked by 02.01.2015 / 17:55