• Mysql Join - Filter results based on two max values 2019-01-30

    I am having the following data set: +----+------------+------+-------+----------+ | id | date | week | time | price | +----+------------+------+-------+----------+ | 1 | 2015-05-01 | 24 | 13:25 | 1.251325 | | 2 | 2015-05-01 | 24 | 14:25 | 1.251256 |

    Tags: mysql
  • Hashed password must be sanitized? 2019-01-18

    It's just a curiosity. If you encrypt a password (using sha1 or other methods) before inserting it in a query, it must be anyway sanitized? Or the hash's result is always safe? This simple code are safe? $salt = "123xcv"; $password = $_POST['pas

    Tags: database, mysql, hash, sql injection
  • UPDATE SET = SELECT FROM 2019-01-18

    I am trying to update table based on a select query using this: UPDATE branches SET name = (SELECT CONCAT(," ",bra.subsurb) as newname FROM companies comp RIGHT JOIN branches bra ON = bra.company_id) Which, according to this que

    Tags: mysql
  • Order table based on specific column count 2019-01-10

    I have a projects table with the following columns id, project_name, remix_of A project can be a remix of another project and the id of the project being remixed is stored in the remix_of column id | project_name | remix_of --------------------------

    Tags: mysql, sql, laravel
  • Having Joins query with limit 10 on second table 2019-01-09

    I have designer and design table designer has many designs I want to get all designers with 10 designs for each designer Is there way I can do it in a single query in either postgresql, mysql --------------Solutions------------- For best performance

    Tags: mysql, sql, postgresql
  • MySQL Event query error #1064 2019-01-09

    I'm trying to create an event for MySQL which should change some values when the date (Datum) is less than today. I used the CURDATE() format because that works best for me. CREATE EVENT `test_event_date` ON SCHEDULE EVERY 1 MINUTE DO BEGIN UPDATE us

    Tags: mysql
  • Where clause without operator 2018-12-27

    While trying to answer this question, I found a syntax which I would have considered wrong select * from table where area and block I tried an sqlFiddle, and found it was valid. But I've been unable to find how it works (all the doc I found was inclu

    Tags: mysql
  • have left join on 2 columns from first table 2018-12-16

    I have a question about MySQL syntax. I have below 2 tables Name table ID Routing start end 1 Route 1 RTM1 RTM5 2 Route 2 RTM1 RTM4 3 Route 3 RTM3 RTM2 Location table ID Code Name Address 1 RTM1 Test1 Address1 2 RTM2 Test2 Address2 3 RTM3 Test3 Addre

    Tags: mysql, left join
  • MySQL: How to create table with auto incrementing column via script 2018-12-16

    I am new to MySQL and hope someone can help me with this. I want to create a simple table with two special settings: a two-column primary key including the columns "de" and "location" an auto incrementing column "tID" that ge

    Tags: mysql, auto increment, create table
  • Custom Archive query for wordpress categeroy 2018-12-08

    I am creating new wordpress webiste, In this website i have 3 categories like News, Blog and Jobs. Now i want to create on Archive section for Blog category. so I am using blow code for Archive dropdown list <select name="archive-dropdown" on

    Tags: mysql, wordpress, blogs, wordpress theming
  • Error message: Cannot delete or update a parent row: a foreign key constraint fails 2018-12-06

    When executing my doDelete.php, this error message appears: " Cannot delete or update a parent row: a foreign key constraint fails (, CONSTRAINT book_user_key FOREIGN KEY (id) REFERENCES user (id) ON DELETE NO ACTION ON UPDATE NO ACTION) &quo

    Tags: mysql, sql, constraints
  • Using recordsets with MySQLConnection objects - VB.NET 2018-12-04

    I'm trying to port a program from Excel to a standalone executable, using VB.NEt as my programming language. However, my previous method of ADODB Connections and recordsets doesn't seem to work here, so I've had to switch to a MySQLConnection instead

    Tags: mysql,, recordset
  • Importing large XML dataset into mysql 2018-12-03

    I am trying to import a large 1GB dataset of XML open data into mysql but I am not used to working with XML and I don't know how to import the data. Here is what the data looks like: <?xml version="1.0" encoding="UTF-8"?> <ns:

    Tags: mysql, xml
  • Point in Polygon function for MySQL 2018-11-27

    I have GPS information stored in multiple MySQL tables structured like the following: (Running MySQL Server version 5.5.43 on Ubuntu Server 14.04.1) event_number, time, latitude, longitude 1, 12:52:50, 40.5401, -86.5715 1, 12:52:51, 40.5404, -86.5707

    Tags: mysql, latitude longitude, point in polygon
  • Alerting framework for incoming traffic 2018-11-11

    Currently I put hourly traffic (total number of input requests) of my website in a MySQL table. I keep data for the last 90 days. I want to check every hour, lets say 6th hour, that has the traffic increased/decreased beyond some threshold than last

    Tags: mysql, alert
  • MySQL Group By query produces indeterminate results 2018-11-07

    I have a problem ... I have one request, but each time I'm refresh the request, the result changes. Here is my request SELECT `t`.*, COUNT('ID') AS `tr` FROM ( SELECT * FROM HISTORY WHERE USER_ID = 1 AND BIEN_ID IS NOT NULL ORDER BY CREATED_AT DESC)

    Tags: mysql, sql
  • Error in my SQL syntax on SQL Fiddle 2018-10-31

    I'm new to sql programming. For a computer science project I am trying to apply my knowledge of sql in some way. On SQL Fiddle, I am using the MySQL 5.6 database and I am having so much trouble building schema. This is what it keeps telling me: "You

    Tags: mysql, sql, sqlfiddle
  • Solution for a web-app with offline and online database 2018-10-27

    Im making a website\shop for a local thrift-store, building it in Laravel using mysql as the database. The problem is that they have really poor internet at the store, almost non existent, and its far from any lines and operators so no better net wil

    Tags: mysql, synchronization, store, laravel
  • Error in SQL syntax MySQLSyntaxErrorException in Grails 2018-10-11

    I do request to MySQL database, which searches data in table by criteria: def tableAcounting(){ def user = Person.findByUsername(springSecurityService.currentUser.username) def cafee = user.cafee def tablesQuery = TablePlacesInfo.createCriteria() def

    Tags: mysql, grails
  • how to convert .sql file to .xlsx(excel) without third party tools 2018-09-17

    i am using mysql server using mysqldump import command i have taken backup of my database in backup.sql file Now i want convert this file in MS excel2010 please suggest me easy way with out using any third party tools .Thank you --------------Solutio

    Tags: mysql, sql, excel, excel 2010

Copyright (C), All Rights Reserved.

processed in 0.123 (s). 7 q(s)