mysql

  • Order table based on specific column count 2019-01-20

    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-19

    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-19

    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 2019-01-05

    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-26

    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-25

    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-18

    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-16

    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-15

    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-13

    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-12-08

    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-20

    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-16

    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-11-09

    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-11-06

    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-21

    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-26

    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
  • Create trigger to update the table row 2018-09-05

    Hi there i would like to create a trigger for (It's MYSQL) what i had first, which doetn't work correct, keep getting project_id to 0 and hash value and insert the project_id_md5. CREATE TRIGGER project_auto_md5 BEFORE INSERT ON project FOR EACH ROW

    Tags: mysql, sql, triggers
  • how do i put variables inside a mysql query? 2018-09-05

    I have two variables like this $date1 = $_POST['f_date1']; $date2 = $_POST['f_date2']; is this the correct way of putting it inside? $sql = "SELECT location, COUNT(*) as Referrals, SUM(CASE WHEN leadstatus = 'Hired' THEN 1 ELSE 0 END) as Hired, SUM(C

    Tags: mysql
  • Why can't I use the INFORMATION_SCHEMA in a sub-select? 2018-09-02

    I am trying to prune a table in a database using the INFORMATION_SCHEMA. To test the DELETE I am using a SELECT to see if the data is coming back correctly. I want to delete the data from master.company based on whether or not the database exists. Th

    Tags: mysql

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

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