MySQL is a freely available, open source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL). Do not confuse this with PHP's MySQLi connector, which is part of PHP.

learn more… | top users | synonyms (7) | mysql jobs

-1
votes
0answers
8 views

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]:,sql [duplicate]

Hello here is the code to import categories, but something bad error: Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have ...
0
votes
0answers
14 views

mysql WHERE CLAUSE to exclude rows based on two different values in same column

I'm using MySQL Data Compare to compare a local & remote mysql db. I'm trying to setup a simple WHERE clause that excludes any rows from the comparison that contain the following values: %mm or ...
0
votes
1answer
9 views

WPF multiple ID's with Datagrid Checkboxes

I'm working on a school project right now where I wanted to challange myself, so I thaught myself how to work with WPF Applications but I ran into an issue which I can't figure out myself. The issue ...
0
votes
0answers
7 views

Hibernate OneToOne bidirectional joined with unique but not primary key

I have two tables: users: user_id (primary) driving_id //unique but not primary users_info id (primary) driving_id //unique but not primary I would like to ...
2
votes
0answers
21 views

Select Sum of hours for specific month and year for specific user

Hello I am trying to realize a query where from DB with hours and dates I can select sum of all hours for certain department, in certain year. Table example is the following: So far the query ...
0
votes
0answers
14 views

mySQL query that won't work with transactions. PHP syntax error?

I have this mySQL query that is working just fine. But I wanted to add another query at the same time, so I thought about using transactions (I'm using InnoDB). The thing is that when using ...
0
votes
2answers
9 views

Warning: mysqli_query() expects at least 2 parameters, 1 given … register.php line 64 [duplicate]

I am creating a webpage which requires a register and login page, however I have been given the following error: Warning: mysqli_query() expects at least 2 parameters, 1 given in C:\Abyss Web Server\...
0
votes
0answers
15 views

MySQL missing data base

After exporting my data base in MySQL I can not locate the data base on my original workbench,but my application is running well. My problem is I can't effect any change to my work. How do I recover ...
0
votes
1answer
21 views

create procedure

please hep, I am trying to create a procedure that will display 4 parameters whenever I enter a parameter. This is my code below CREATE PROCEDURE sp_emp_info ( @EmployeeID INT, ...
0
votes
2answers
31 views

A correct way to make relationships between three tables

I am building a library database and I am stuck on one particular thing. I have three tables :BookCopy, BookLoan and Members. It is not clear to me how to make the relationships between them, so a ...
1
vote
2answers
13 views

Undefined Object in Wordpress

I am new to programming and following instructions in a couple of books and the wordpress codex. I am attempting to access a custom database using the $wpdb object. This is being done locally. I get ...
0
votes
0answers
23 views

Select option to enable another select after doing SQL statement

How can I select option from (select) and after that doing SQL statement based on "id" and after that showing new list in new (select) based on old (select). Here is my first (select): <?php ...
0
votes
1answer
15 views

SELECT with INNER JOIN, GROUP BY and LIMIT

I have a three tables about movies. First one is movie, second one is actor and last one is movie_actor_mapping. I wrote an query that select data from table movie and group actors for each movie. And ...
0
votes
0answers
18 views

Can't search table by string in phpMyAdmin

I have a table of fake professors and some relevant info. I can search by id, latitude, and longitude, but any LIKE searches on the string columns (i.e. name, university, school) come up empty. I'm ...
0
votes
1answer
9 views

MySQL - Ignore insert to mapping when duplicate entry by two unique columns

I have a mapping table for movie and actor. My query to insert data looks like: "INSERT IGNORE INTO movie_actor_mapping (actor_id, movie_id) VALUES (%s, %s)". And here I have to ignore duplicate rows, ...
0
votes
0answers
4 views

Jenkins - Conditional Build - SQL

Trying to setup a conditional build step in jenkins as follows: 1st execute shell step: run query over mysql. if query returns results would be a TRUE condition if query returns no results then would ...
0
votes
1answer
9 views

MySQL foreign key using more than one field to reference to a primary key from another table

I want to reference 2 of my columns in one table to a primary key from another table. Here is how it looks like in the db structure: Users uid (INT) name (VARCHAR) 1 John Doe 2 ...
0
votes
0answers
13 views

JavaFX Getting MySQLSyntaxErrorException at some datas only

i am trying to change some datas to mysql , and for some items or id's(PK) it works fine , but for 2 or 3 of them i get MySQLSyntaxErrorException. Here's the code: @FXML public void ...
0
votes
1answer
15 views

Python Insert vars with commas into MySQL

I have variable value with comma (ex. var='some text, with comma') How to INSERT this whole text (with comma) into one column? My code doesn't work: c.execute("""INSERT INTO resumes (var) VALUES (%...
0
votes
0answers
7 views

2 independent auto_incremental fields in MySQL table

I am trying to create a MySQL table that has a generic ID column, but also a secondary ID column, both of which need some form of auto incrementing currently my MySQL table looks like this: ...
0
votes
1answer
8 views

Using trigger to calculate amount..But can't get the value of price

I have the following tables: Table Goods_has_Taker(order_id, good_id...) Table Goods (good_id, price...) Table OrderD (order_id, transaction_date, amount) I am using a trigger to calculate the ...
1
vote
0answers
7 views

More optimal way of selecting only max records for two columns in MySQL

I am currently wanting to select the current top 25 ranked teams from my MySQL db with this query: SELECT team_school, team_name, rank, rank_name, week_key, year_key FROM teams t JOIN weeklyrankings ...
0
votes
0answers
20 views

VPS with SSD or more powerfull processor?

What do you think about VPS servers for web app which also has API for mobile app? Taking into account that we have some budget on a server, is it better to take machine that has SSD and lower ...
-1
votes
1answer
10 views

PhpMyAdmin - SQL Creating tables Error #1064

I'm trying to create some tables, with a one-to-many relationship between them. I get this error, I have read other threads, and suspect it is something to do with the FK. Any help would be great! :D ...
0
votes
1answer
23 views

Add to CONCAT() if a column is = 1

Im trying to get a SQL query to concat "FreeShipping" to a string only if I have a '1' in FreeShipping field This is the current SQL I have but I have no clue how to use the IF statement and add the ...
0
votes
0answers
7 views

Hive Query to find frequency of occurunce

I have a large table with 2 columns movies and hours. I need a hive query to find out the most common hours for which each movie has occurred. That is group by movies and find the mode(maximum ...
0
votes
1answer
34 views

PHP/MYSQL: Using 'CONCAT' and 'AND' clause in MYSQL Query

I'm trying to execute this query: Query 1: $query = "SELECT a.*, b.title_wo FROM `worksheet_master` AS a INNER JOIN `work_order` AS b ON a.wo_number = b.wo_number ...
0
votes
0answers
14 views

Loop with insert queries break after 8th iteration

I have a script which one pare some data from web page and insert this data to two MySQL tables. But each time my loop broke after 8th loop. I mean script inser 8 new rows and script finished with ...
0
votes
1answer
25 views

Select, edit and then insert data into new database

What is the best way to SELECT all from MYSQL DATABASE_1 almost every item edit (split, merge, validate email format, validate URL format, etc.) - by using php and then INSERT INTO new DATABASE 2. ...
1
vote
1answer
31 views

mysql - how to delete records with condition

Here is my table structure: CREATE TABLE `order` (`order_id` int, `order_status_id` int, `ip` varchar(11), `date_added` datetime) ; INSERT INTO `order` (`order_id`, `order_status_id`, `ip`, ...
0
votes
0answers
7 views

Export MySQL Database from Ubuntu to Windows without .sql files

I've been working on Ubuntu for a while, but I lost the password of my account. As I've lost my password, I could recover the files that are: *.frm, *.opt (for db.opt) and *.ibd Here you have an ...
-1
votes
0answers
83 views

Need help deleting multiple values from database at once

I've been working a bit on basic mySQL-database stuff, and have learned to show the contents, insert, delete, and update data, all via PHP. Now I've been tasked with putting it all together in one ...
1
vote
0answers
10 views

MySQL SUM for Persian numbers not working

I have a DB and Tables with collation utf8_general_ci (all of them) and charset utf8 (all of them) ... In this table: and with this PHP code: $query = "SELECT SUM(carpet_rows) AS cr_sum FROM form1"; ...
0
votes
0answers
10 views

Android App SSL Error

I am trying to insert a record into MySQL by posting data to a PHP server from an Android app. I have added the INTERNET permission to AndroidManifest.xml but i get responce javax.net.ssl....
0
votes
2answers
11 views

SQLite: join selected columns from two tables

I am trying to create a new SQLite table merging only selected columns from one table with all of the columns from the second table. The two tables share only one column (primary key for one table ...
0
votes
1answer
12 views

How do I use an array with a value with a single quote in a MySQL query?

mysql_query("INSERT INTO objects(objId, objectId, objectCategory, SortOrder, Name) VALUES('{$obj_id}', '{$object_id}', '{$object_category}', '{$sortorder}', 'My " . $objecta['Name'] . "')")or die(...
0
votes
0answers
18 views

Calculate min and max location dwell time using SQL

I have a table of randomly distributed location event data, and I need to calculate both a min and a max time that each user stayed in each location. The min time would be the largest timestamp - ...
0
votes
0answers
11 views

PHP/Phinx - Inserting Longitude/Latitude causes PDO MySQL geometry object error

I'm attempting to create a CitySeeder using Phinx. But I'm getting the following error: [PDOException] ...
0
votes
1answer
23 views

MVC Joining many 2 many tables and filling list based on result in c#

I am doing a school project and need help with this last problem I am having. Currently I am trying to do a many 2 many join and then fill an IEnumerable list with the result - using linq and lambda....
-1
votes
0answers
21 views

Get max value of a column before it becomes zero, then sum all max values within the same year R

I am working with a plant (agricultural) growth model, simulating daily growth of plant (crop). This daily growth is recorded in a table, and I am using R to process the data stored in such table. ...
1
vote
1answer
15 views

php set timezone then insert into datatbase

I'm recoding my php script into mysqli and have most of the functions working how I want them to work except for the date and time stamp of an IP connection to my website. Current code as follows ...
0
votes
0answers
7 views

404 NullPointerException with AngularJs Java and Jersey

I've been asked to make an App with AngularJs, Bootstrap, Java and Tomcat as a server. I'm new with java ee so maybe my error is quite simple, but I can't find a solution. You can see the project ...
-3
votes
0answers
9 views

Access denied in mysql

I created the procedure: delimiter $$ DROP PROCEDURE IF EXISTS drop_usr; CREATE PROCEDURE drop_usr(user TEXT,host TEXT) BEGIN DECLARE account TEXT; DECLARE CONTINUE HANDLER FOR 1396 ...
0
votes
0answers
20 views

Login Error In PHP and MySQL

i use this code to signup an user on my site: $username = mysql_real_escape_string($_POST['username']); $escapedPW = mysql_real_escape_string($_POST['password']); $salt = bin2hex(mcrypt_create_iv(32,...
-1
votes
1answer
21 views

Compare 3 variables and echo the winner most voted

I have 3 queries to a MySQL database but I will make it simple like this example: $var1 = "354"; $var2 = "980"; $var3 = "27"; I need to compare in some way these 3 variables and display only the ...
0
votes
1answer
19 views

Date Conversion to String

I am trying to extract data from an outside vendor's source database. I am connecting through a JDBC connection and think (based on the syntax it might be mysql or sql server). However certain ...
1
vote
1answer
20 views

Having troubles with EXISTS and GROUP BY

I've been working with this for a while can I can't find a soultion, so maybe you can help me out. I have a table with 3 columns 'id' 'product' 'code', a product can be repeated but a code must be ...
1
vote
1answer
12 views

NotFoundHttpException in RouteCollection.php line 161: in Laravel 5.2

I need print My collaborators who related with project_id in collaboration table. this is My dompdf controller <?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Http\...
0
votes
1answer
14 views

spring boot - com.mysql.jdbc.spring boot exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'customer0_.email' in 'field list'

I have two tables User and Customer which extends from User in MySQL implemented in Spring Data JPA and a simple REST controller I created to test posting data to the database. User package mk....
-1
votes
0answers
19 views

Trying to Write to MySQL database from HTML comment Box

I'm having trouble getting this code to write to my SQL database. I can see my table existing in phpMyAdmin. When I write to it and have it spit out it's execution code it looks the same as my $query ...