Questions tagged as 'mysql'

1
answer

Use field names in a query prepared with PDO

I connect with this php: class Conexion extends PDO { private $tipo_de_base = 'mysql'; private $host = 'localhost'; private $nombre_de_base = 'basededatos'; private $usuario = 'user'; private $contrasena = 'user'; pu...
asked by 20.07.2017 / 19:42
1
answer

Pass fix value to query

I am trying to pass a value of my fix to my query but at the moment of doing it it says to me:    Array to string conversion My fix comes from a function in a file called functions.php It is the first value of my array that I wa...
asked by 22.07.2017 / 19:24
1
answer

MySQL - Show 0 when no records are found in a Time Zone [duplicated]

Good morning, I would like to know how to count the date field (Ex: 2017-03-12 08:14:12) that is in the specified time zone (Between 08:00:00 and 08:29:00) and until 18:00:00 and 18:29:00 and I SHOW ZERO "0" when I do not find calls, but it on...
asked by 13.03.2017 / 23:17
1
answer

Token mismatch when inserting two columns in another mysql table?

I have a code that selects two columns in a database: SELECT DISTINCT ('owner_account'), 'grouped_country' FROM 'genuine_k_value'; What I have to do is insert values into another table. I have tried to do the following: INSERT INTO 'genui...
asked by 14.03.2017 / 17:40
2
answers

Problem with PHP recursion

I have the following function in PHP that receives a date and a id_persona , which searches in a table of the database if there already exists a record with that date and with that id_persona . It works well, only that I need...
asked by 27.03.2017 / 17:15
3
answers

Problem when sending a range of php dates

I have two input that passes a range of dates to the program in php that I have to return some ids, the problem is that it does not return anything, all in white: Desde Fecha <input name="desde_fecha_cumple" type="date" value="<?php echo...
asked by 05.04.2017 / 17:03
1
answer

LogIn UWP C # + MySQL + PHP

Hello again guys; How can I consume a PHP web service from a universal application in C #? I searched through many codes until I found this Microsoft it works very well, everything is in the MainPage.cs. What I'm trying to do is creat...
asked by 20.04.2017 / 00:27
1
answer

fatal error call to a member function prepare () on boolean in functions.php online 32

I am making a news system that is perfect in apache and in an online server. This error arises when running the site on a local server windows iis can be the php versions? has the 5.6 $bd_config = array( 'basedatos' => 'noticias',...
asked by 13.02.2017 / 15:36
2
answers

add Shortcode plugin custom

everyone! I have this code, <?php add_action('wp_head', 'app_searched_today_visitbh'); function app_searched_today_visitbh(){ <?php global $wpdb; $horas = $wpdb->get_var("SELECT time_format(timediff(now(),date_people),'%...
asked by 13.02.2017 / 23:38
1
answer

LIKE BINARY in MySQL

I want to select a set of results that, passing the option by like, but the result can be that it is lowercase or capitalized. I did this way: SELECT * FROM DocumentosAux WHERE numeroDocDisco like binary 'pbra'; Also: SELECT * FROM Docum...
asked by 14.02.2017 / 15:31