mysql

  • Sails passport js integration using sails as REST API 2019-03-21

    I am trying to use passport js for authentication in my local mysql database. I am using postman extension to test the application. I am sending two fields i.e. username and password for authentication. When any one of the field is blank then respons

    Tags: mysql, node.js, passport.js, sails.js, passport local
  • Implementing materialized paths in SQLAlchemy and MySQL 2019-03-10

    I am trying to implement materialied paths in MySql using SQLAlchmey.I am following this example from the SQLAlchemy docs: http://docs.sqlalchemy.org/en/latest/_modules/examples/materialized_paths/materialized_paths.html The example is for Postgres a

    Tags: mysql, sqlalchemy
  • Column naming issue, how should I name this column? 2019-03-08

    Lets say I have table User and every User can have one book. Question is: How should I name the column with relation to book ? bookId or idBook ? I just saw the second option in code and IMO it's ugly, what do you think guys and girls ?

    Tags: database, mysql, sql
  • redis store a visitors visit 2019-03-02

    Im using redis (predis and redis) in my web-project. I have a website that you visit other peoples profiles. I would like to: store the userid of the visitor unix timestamp for the time userid for the profile. I would also like to: get the total amou

    Tags: mysql, redis
  • 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(comp.name," ",bra.subsurb) as newname FROM companies comp RIGHT JOIN branches bra ON comp.id = 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 (fyp.book, 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, vb.net, 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

Copyright (C) dskims.com, All Rights Reserved.

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