Please confirm my use of primary key and unique index

MySQL
I think I understand primary keys and indexes. In my setup, I have a table with several columns. Two of these columns are User ID, and Username. Idea...
4 months ago

MySQL select nearest location only if also latest location

MySQL
Say I have 3 tables like so: cities ------ name latitude longitude stalls ------ id name locations --------- stall_id latitude longitude date I w...
4 months ago

Mysql 5.0 Stored Procedure Syntax

MySQL
I'm just trying to create my first mysql stored procedure and I'm trying to copy some examples almost directly from the documentation, but it isn't wo...
4 months ago

Issue with MYSQL DB Connection after importing it

MySQL
i created a program on my working mashine which uses mysql. On that mashine everything works fine. So I exported the database with MYSQL Workbench 6....
4 months ago

Unable to figure out sql query for a task

MySQL
I have database with following tables Login table- CREATE TABLE [dbo].[Login]( [username] [nvarchar](100) NOT NULL, [password] [nvarchar](50) NOT NUL...
4 months ago

MYSQL cumulative sum by player

MySQL
Im having a table with players and their scores. I managed to create a query to get the cumulative sum. I want the query to group this cumulative sum ...
4 months ago

How to tell if a mySql event succeeded or not?

MySQL
I have around 5 mySql events that autorun 15 minutes after each is done. They all update a table with sum() of votes, starting at 00:00. Is there an...
4 months ago

Command does not work as alias

MySQL
I have this two commands that work: awk -F'[= ]' '/^password=/ && p !~ /clientreadonly/{print $2} {p=$0}' ~/.my.cnf perl -00 -ane '/\[client\...
4 months ago

Select left join in Yii2 is failed

MySQL
When I following this tutorial and I tried for part the left join is failed. I don't know why, please tell me to fix. This code in controller: pub...
4 months ago

Cannot insert into MySQL database using MySQLdb python

MySQL
I have been trying to insert into a MySQL database from python using the MySQLdb interface. While I have been able to successfully execute select quer...
4 months ago

Search engine for Arabic letters in php

MySQL
I'm trying to create search engine using php for search arabic letters from my database but I didn't get anything, but my code working fine with engli...
4 months ago

Laravel: Finding row by xp_start and xp_end

MySQL
I am trying to find a certain row in a MySQL table just by having a number. I have a number with is the xp_current in my users table, I need to find t...
4 months ago

Django 1.11 not recognising Foreign Key model assignments

MySQL
I am having an issue with 2 Foreign Key assignments in my django model. See models.py below: from django.db import models from django.contrib.auth.mo...
4 months ago

Database Design for multiple tables of same type

MySQL
I have a situation where I would like to store about a terabyte of information in a database format to support query. I am not experienced when it com...
4 months ago

MySql Semi-Dynamic Table Names

MySQL
I'm using a MySQL database to store individual tables for each 'data object', and PDO for access. The name of the table is stored in another database/...
4 months ago

How relating two tables to show name row and not the id in mysql+pdo

MySQL
I don't know how show the name of the row in table 2 instead of his id when show it results of table 1. Let me explain: I have this tables in innoDB...
4 months ago

Laravel group by foreign key

MySQL
I have three models Project Category Drawing The relationship between them is as follows Drawing belongs to a category Drawing also belongs to a...
4 months ago

Best database & schema for a tree?

MySQL
What database (and schema, if applicable) would be most appropriate for storing and retrieving data (location, timestamp) that can be placed at any no...
4 months ago

Syntax error inserting contents into table

MySQL
I keep getting a syntax error and I don't know whats wrong. Can I not call a predetermined string? $sqlstring= "INSERT INTO friends (friend_id , frie...
4 months ago

Database structure for handling synonyms in a search engine

MySQL
So I am trying to create an application which has a search element, and I need to figure out a way to handle the data in a smart way in the database. ...
4 months ago