Questions tagged as 'mysql'

2
answers

Write data in two tables from a PHP form

Connection to bd $host = "localhost"; $user = "root"; $pass = ""; $conexao = mysqli_connect($host, $user, $pass) or die (mysql_error()); mysqli_select_db($conexao, "teste2"); HTML <head> <title>Gravar</titl...
asked by 30.09.2015 / 15:42
3
answers

Run function in PHP to insert data into DB daily at specific time

I am creating a "module" of my system and now I have to create a function that, when it arrives at the time that is in the database, execute a insert . For example, if the table is the 22:00 time, at 10:00 pm every day it will run...
asked by 29.12.2015 / 01:14
3
answers

How to insert the data into a specific field of a _mysql_ table?

I have a table named company, with the fields name , address , city and link . How do I enter a value in the link field that is empty?     
asked by 14.08.2017 / 15:25
4
answers

Connecting PHP with the MySQL database

I need help I'm trying to connect my PHP file with the bank so I can make a query and display the logs. Connection code: define('usuario_bd', 'root'); define('senha_bd', ''); define('nome_bd', 'loja'); mysql_connect('localhost/phpmyadmin',...
asked by 15.08.2017 / 19:06
2
answers

How to set up a SQL to display grouped content per month?

I need to set up a SQL to group information by month into columns formatted by Bootstrap. Come on: <div class="container"> <div class="row"> <div class="col-md-3"> <h2 class="eventos_mes">Maio<...
asked by 21.09.2015 / 14:30
2
answers

PDO Statement Questions

I would like to know if when I use the queries for SQL commands with PDO I need to use bind() : $SQL->bindValue(1, $email, PDO::PARAM_STR); // Seria algo assim? For example in this case: $searchSQL = $pdo->prepare('SELECT emai...
asked by 08.03.2017 / 15:36
1
answer

Sort query by date

How can I sort a query by date? SELECT * FROM agenda ORDER BY evento ASC In this way it is appearing as follows: 03/30/2017, 05/31/2016 (the date with 2016 should appear first).     
asked by 17.03.2017 / 20:22
1
answer

Get values that were not used inside bd

I have a table with multiple product codes: EX: 1, 2, 3, 4, 5, 15, 20, 21, 22, 45, 60 ... 100 Would you like to know if there is any query to pick up the codes that have not yet been used in the records? In the above example code 5 jump to...
asked by 25.09.2014 / 16:08
4
answers

How to solve image upload problems in Wordpress?

After migrating to Kinghost, I'm having trouble uploading images to the Wordpress library. I normally upload the image but it does not seem to go into the library, it looks like it was created in the database but it does not appear in it, instea...
asked by 12.09.2014 / 01:19
2
answers

Use mysql_fetch_assoc more than once

I have a big question about mysql_fetch_assoc in while. what happens is the following, I have a page where I do a database search and return for a while while the existing information with mysql_fetch_assoc, the problem is, when I want to do thi...
asked by 31.07.2014 / 23:57