Questions tagged as 'sql'

0
answers

Problem with PDO and query with variables

I have a query that does not run correctly when I enter it in PHP: SELECT id_continente, id_pais, id_localidad, visitas, posicion_pais, posicion_continente FROM (SELECT *, @posicion := IF(@cont...
asked by 05.09.2018 / 10:24
2
answers

problem on the date 1970

I have a variable in my DB which stores the following value FECHA_MOV= "2015-03-19 04:34:20" I would like to print (show) the date in this format "d-m-Y" ==> 19-03-2015 . But I get the next date "01-01-1970" ==========codigo...
asked by 10.09.2018 / 21:47
0
answers

Wordpress does not bring the username Sql statement

I am modifying a wordpress plugin that brings me a series of fields from my table .. $result = $wpdb->get_results( "SELECT * FROM '{$wpdb->prefix}statistics_visitor' ORDER BY '{$wpdb->prefix}statistics_visitor'.'ID' DESC LIMIT 0,...
asked by 01.09.2018 / 20:42
0
answers

Assign a role to a user when registering Asp.NET MVC

I am developing an application in Visual Studio 2017. I am using Membership as it is. I need the application to show the views according to the type of user, that would be with the roles. What I need is for the user to register to select the typ...
asked by 02.09.2018 / 23:20
1
answer

Save new file or Replace existing file SQL C # .net

I'm with a project that stores documents, My question is how can I store them and that SQL tell me if the document with the same name or ID exists. This is the SQL code: USE [HConDe] GO /****** Object: StoredProcedure [dbo].[ActualizarDocu...
asked by 11.09.2018 / 15:58
0
answers

Group Concat mysql loses the order BY

I have the following SQL Query but the order by the GROUP Concat in some results does not have the expected order as I would like it to be by the date as shown in the image below. SELECT objects.*, GROUP_CONCAT(mvalues.value ORDER BY mvalues....
asked by 11.09.2018 / 14:18
0
answers

I can not download file by php sql

I am trying to download a file (in this case an .xls) by means of php and sqli. The file (hello.xls for giving you an example name) is "downloaded" with its correct name but it weighs 0kbs, so it does not grab the file, it just retrieves the nam...
asked by 03.09.2018 / 17:12
0
answers

HOW TO WRITE EXCEL WITH HEADENDS?

I try to write a file with query, where the first column of the query is the header of the rest of the columns when writing it in excel, this is the code which writes it, the problem is that it only writes the last value of the query. Workbook...
asked by 31.08.2018 / 22:34
0
answers

How to audit the name of the affected column, the previous value and the new value with a trigger dynamically?

I have a table to audit: Tabla Tabla ID, col1, col2, col3, col4... col500 If you make update in Tabla my trigger is triggered which inserts in the table Tabla_audit Tabla_audit ID, ColmunaAfectada, ValorAnterio...
asked by 30.08.2018 / 02:11
0
answers

Warning: mssql_fetch_row () expects parameter 1 to be resource, boolean given - SQL

I do not know if you can help me or my question is not understood, I leave it to you in the same way, I have the following error:    Warning: mssql_fetch_row () expects parameter 1 to be resource, boolean   given in usr / home / FFFF / paymen...
asked by 04.09.2018 / 21:05