Questions tagged as 'mysql'

1
answer

LIMIT does not interpret the variables

Does anyone know why the variables are not interpreted? I'm passing via ajax with data:{"inicio=0&fim=2"} and when I try to return to the query I can not. $.ajax({ url: 'php/teste.php', type: 'POST', data: "inicio=0&a...
asked by 28.05.2018 / 17:39
1
answer

Someone can help me I'm kind of new on the subject ... DATA BANK

I'm creating a test site for questions ... has 3 types of tests. FRIENDSHIPS BOYFRIENDS MARRIED Each test has 15 questions, how do I save the text of those questions in the database, and then generate a hit?     
asked by 18.01.2018 / 00:18
1
answer

Multiple inner join PDO inserts

Hello, I have in the DB the tables categoria and imagens Currently the function (in PHP) to insert in the table category is similar to this (only title itself): public function insere($ttitulo) { try { $stmt =...
asked by 07.03.2016 / 22:06
2
answers

Problems with characters in php, with utf-8. How to solve? [duplicate]

I created a table in php that returns MYSQL data in phpadmin, however the information returned in the table is coming like this: "Data Mining and Simulation" Notice the next question mark in place of TIL accents. I put UTF8 unicode CI...
asked by 08.09.2016 / 18:19
1
answer

How can I do the foreach correctly [closed]

asked by 28.12.2016 / 15:56
2
answers

PHP - Parse error: syntax error, unexpected 'public' (T_PUBLIC) in [closed]

Good morning! I am with this code and I support the site, out of nowhere this error started to appear: ( public function getUrlcliente($cliente_id) { $parametro = "cliente_id=" . (int)$cliente_id; $url_cliente = $this->db...
asked by 28.11.2016 / 12:04
1
answer

Error executing mysql_query [closed]

This is my programming line 17: $result = mysql_query($localhost, "SELECT *FROM **nome do meu banco**") or die (mysql_error()); This is the error I can not get:    Warning: mysql_query () expects parameter 2 to be resource, string   giv...
asked by 07.09.2016 / 23:18
2
answers

Association of categories in PHP and MYSQL [closed]

I'm developing a site that has items, an item can have more than one category, how do I link those categories with that unique product?     
asked by 15.09.2016 / 16:17
2
answers

About Object Oriented in PHP

I have my connection.php file with the code below: $banco_hostname = "localhost"; $banco_usuario="root"; $banco_passwd=""; $banco_nome="banquinho"; $conexao = new mysqli($banco_hostname,$banco_usuario,$banco_passwd,$banco_nome); In my b...
asked by 31.07.2014 / 07:50
1
answer

Use PHP PDO to search

Where is the error in my code. I do not know why it does not return the search result. <?php require_once('db_connect.php'); $conectar = new PDO("mysql:host=$host;bancodedados=$bancodedados;charset=utf8", $usuario, $senha); $nomeProduto...
asked by 10.09.2018 / 23:57