Questions tagged as 'mysql'

1
answer

Avoid duplicate date and time for same scheduling professional

Friends I'm trying to create a schedule for a dental clinic, but I'm having a hard time avoiding the client scheduling a date and time that has already been scheduled for that selected professional. For example, someone has already scheduled the...
asked by 30.05.2015 / 04:22
2
answers

Export data from an object to csv file with PHP [duplicate]

I am trying to export data from the database to a CSV file, but all the functions I encounter to perform such a function have a certain type of error. I am doing all the search in the database with PDO and returning the data to my Control,...
asked by 03.06.2016 / 02:37
3
answers

Avoid duplicate records in a given MySQL column [duplicate]

I have an auction system where multiple users can bid, but I'm having a problem when bids occur at the same time because they are inserted into the database with the same value in column bidding_price , eg:    0.02   0.02   0.02...
asked by 15.04.2018 / 21:07
2
answers

How to display the id as form counter [closed]

I'm creating a form counter and would like to know if I'm going the right way? This is my select query <?php error_reporting(-1); ini_set('display_errors', 'On'); //Criar a conexao $link = new mysqli ("localhost", "root", "", "peixaria"...
asked by 21.01.2017 / 17:07
2
answers

Date_format does not work in code

After following several Date_format instructions and operating guides, I preferred to ask for help because I tried everything and could not format the date and time output of the Mysql database. Does anyone know why this function does not work i...
asked by 29.02.2016 / 21:52
2
answers

How to make something expire after certain months in db?

I want to add a "license" to a purchase in my database, plus that license that my "customer" will buy will have an expiration time, let's say he bought a license ... INSERT INTO compras (userid, pluginid) VALUES ('$userid', '$pluginid');...
asked by 01.06.2016 / 20:15
2
answers

Use UTF-8 or Latin1?

I started a new project and when creating the database (MySQL), I did not think twice, I put a CHARSET=utf8 . The application will support Portuguese and English and users should use only these two languages. In a specific module users...
asked by 24.04.2018 / 18:02
1
answer

Insert foreach value into a variable

I'm trying to create a variable with the foreach variables for bank insertion, checkbox values are checked, I'm trying this way: // buscando os produtos foreach ($_REQUEST['produto'] as $value) { $rel0...
asked by 14.01.2015 / 20:08
2
answers

Change date and date time format in MySQL

I do not want code to send the date converted to MySQL, I want to know if it is possible for the date to appear as 09/05/2018 09:59:54 instead of 2018-05-09 09:59:54 . Is it possible to change this in some configuration?     
asked by 09.05.2018 / 15:31
1
answer

Update in the bank via javascript

I need to make a button that when the user clicks the corresponding line it executes the following code without refresh: Line Code: mysql_query('UPDATE tbl_publicacao SET status = S WHERE cod_publicacao = $cod_publicacao');" Line: <...
asked by 27.02.2017 / 20:57