Questions tagged as 'mysql'

1
answer

How do I add a value to my database?

I need that, if the value is null, it would add the variable getid() to the database. string comando = "SELECT COUNT(*) FROM usuarios WHERE username=@Usuario AND senha=@Senha AND tipo=1"; var connection = new MySqlConnection(connString)...
asked by 07.06.2017 / 15:26
1
answer

How do I save an array of quantities and sizes to the bank for a product registration? PHP [closed]

I have a crud where I register the product, inside this register I have a modal where it is possible to inform the sizes and quantities of the product that I am registering, then this modal returns me an array of sizes and an array of quantities...
asked by 08.06.2017 / 17:53
1
answer

auto insertion of MySQL timestamp

I'm using the ON UPDATE CURRENT_TIMESTAMP option, but the format that is updated in the table comes in this format: "2017-06-07 13:05:02" , I would like it to be in seconds like this: 1496851485 , the more curious is that when I comp...
asked by 07.06.2017 / 18:08
1
answer

Error trying to retrieve data from MySQL with PHP

I'm making a webpage that contains login for an administrative area, but where I'm creating and doing the tests (on a local server) is working normally. When I copy the project and put it in my notebook to test and present the project, the sam...
asked by 21.05.2017 / 00:15
0
answers

Migration with multiple banks in Laravel

I'm trying to create a migration that has a foreign key referencing the id of a table from another database, both MySQL. Follow the code: //config/database.php 'mysql' => [ 'driver' => 'mysql', 'host' => env...
asked by 21.06.2017 / 13:26
0
answers

WordPress - Lock wait timeout exceeded - wp_cron

Sirs, I am looking at the following log, but I do not know enough to understand it completely. How can I solve such a problem? It has been happening constantly, but I do not know how it is generated, I tried to search the pages of my site but...
asked by 21.06.2017 / 15:41
1
answer

Feed Select with another Select Mysql

I'm trying to feed a Select as it was selected in another Select main <select id="grupo" name="grupo" > <option>Selecionar Grupo</option> <?php if(isset($grupo->db->data[0])): ?> <?ph...
asked by 05.06.2017 / 20:54
1
answer

How to capture the code of a table generated via html?

I created a table with data by HTML and PHP, how do I generate a string from this table with this data so I can play in my DOMPDF load_html?     
asked by 26.06.2017 / 19:49
3
answers

Search name by first and last name

I'm having a hard time crafting a query MySQL to search for a name, so the person can type the first and last name and accept another name among them. For example: Search: 'JOSÉ NUNES' or 'NUNES JOSÉ' Result: JOSÉ SILVA NUNES The way...
asked by 06.06.2017 / 20:46
1
answer

Connection error using namespace

I have a file that is responsible for connecting to DB and is in PDO. <?php namespace clientes\model; class conexaoPDO { public static $instance; private function __construct() { } public static function getIntance() { if (!isset...
asked by 26.06.2017 / 22:15