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
5 views

Select rows from table where one field meets two conditions and other fields must have different conditions from the first result

Kinda hard to explain in title. Sample data Each rows represent each participant of a match matchID: Corresponds to the ID of a match champID: Champion ID that where used in that matchID teamID: ...
0
votes
0answers
7 views

Join two table based on one coloumn for multiple values from second table

i have table store_profile like this id Storename Storetype address 1 Samsung Store Electronics Delhi 2 Levi Clothing Mumbai 3 Soni ...
-1
votes
0answers
5 views

Export MAMP Database without Running MySQL

I have thoroughly confused my local dev environment. I wish to transition out of using MAMP PRO and to set up a dev environment without it. I am currently not able to run MySQL. I have backed up the ...
2
votes
0answers
11 views

Java Spring REST API Handling Many Optional Parameters

I'm currently messing around with a Spring Boot REST API project for instructional purposes. I have a rather large table with 22 columns loaded into a MySQL database and am trying to give the user the ...
-1
votes
0answers
7 views

Change MySQL date format (system wide)

As per the question - the challenge is not a matter of calling: FROM_UNIXTIME(timestamp, '%m-%d') Instead I need to call FROM_UNIXTIME(timestamp) Without the explicit formatter -- problem is ...
0
votes
0answers
3 views

Best Practice Architecture: Wildfly 10.1 and MySQL DB

I need two instances of Wildfly running on two different machines using the same database. How do I implement such an use case? So far I see two options: mysql databases on both machines (mirroring ...
0
votes
0answers
20 views

Connect from my website to a MySQL database hosted in another computer using PHP

I got this problem, let's see if some one here can give me a hand with it. I got a website hosted in a computer, with its own database, and I can access it from any computer using the domain pointing ...
-3
votes
2answers
21 views

SQL How to select two Distinct tow coll one not

i have a table such as: C1 |C2 |C3 |C4 int|int|int|datetime (day and HH:MM:SS) and i need to write a query that for each C1 and C2 returns the most recent C3 (in terms of C4), it should be order by ...
0
votes
0answers
7 views

Multiple Terminal to select a number from a list

I am using c# winforms-MySql Server. I have 12 values and in every hour I need to select one value from that 12 value list. Timer can easily select the number. But the problem is I have 5 Terminal ...
0
votes
1answer
22 views

Delete statement not remove the record

I'm using pdo and I'm trying to remove the records that have a date (expire) less than the current. Actually I made a little pdo wrapper that bind the value automatically this is the statement: ...
0
votes
0answers
8 views

Cannot display database data in AngularJS project via MySQL

I followed code at https://phpcmsforce.wordpress.com/ but I cannot seem to make the data display. Please tell me if I am missing something! index.html: <!DOCTYPE html> <link rel="...
-2
votes
0answers
20 views

C++ Login Post Form

I'm learning C++ currently (for 2 days already, haha.). So, I wanted to ask you guys how I can realise a Loginpost (HTML-Post) to login through my C++ Program. The PHP-File is working correctly ...
0
votes
0answers
5 views

Adding value into a table with foreign table with SQL

I'm trying to fill in values in a table that has a foreign key. Which isn't possible tue to the foreign key. But the table that's referenced by this foreign key, has another FK that leads back to the ...
0
votes
1answer
5 views

Check_Time in show table status

We have MYSQL running in production. Recently we noticed few changes on one of the table. We checked few information using " Show Table status" command. We noticed Check_time column on that table had ...
0
votes
0answers
8 views

What is the best practice for writing query based APIs?

In a fairly large project we have multiple modules, tables and entities. Now for better communication between database and server most people (including me) create stored procedures (SP). But due to ...
-3
votes
1answer
20 views

repeat insert value in mysql

<?php include("config.php"); $cart=$_GET['cart']; $numberofcart=$_GET['numberofcart']; if ($cart) { mysql_query("INSERT INTO trade (cart,price) values('$cart','150LE')"); } ?> <...
0
votes
1answer
20 views

Deleting a row within SQL database webpage [duplicate]

My aim is for a user to click a button within a row to delete that row within the database. The button is declared as so: <td><button class="btn btn-default" onclick="removeStudent()" ...
0
votes
0answers
25 views

How do you transpose a table in a generalizable way in SQL?

How would you transpose this table: old_table +----+--------+-------------+-------------------+ | id | type | field | value | +----+--------+-------------+-------------------+ | ...
0
votes
0answers
5 views

Compare rfid card number to sql database

I am working on a project that is kind of over my head so any criticism is welcome. I am trying to replace the old arduino card reader system at my company with one using the raspberry pi. What I am ...
0
votes
1answer
11 views

Years in Array to key, then populate with many dates in that year

So I have an array like this pulled from the database: Array ( [0] => stdClass Object ( [created] => 2012-08-22 00:00:00 ) [1] => stdClass Object ( [created] =&...
0
votes
0answers
49 views

Is there better way to query the database? [on hold]

I am unsure how to query off two attributes using ActiveRecord. I have a Item model that has a location column as a string. I want to query only for items with a matching location and that were ...
-1
votes
4answers
39 views

SQL: Get all columns on MAX

Using (Webmatrix, MySQL, cshtml/razor) Hello. I'm trying to get all the values on the row that is the max one, but cant get it to work! This line gets the max KG, where exerVariName is something. ...
-1
votes
0answers
26 views

save the selected value from dropdown to database laravel

I have a table with contents from the database. one of the rows is a dropdown with 2 setup options: @foreach($users as $user) @foreach($user->cars as $users) <th scope="row">1</th&...
0
votes
0answers
9 views

spring query dsl: how to sort by two database fields, one of the being foreign key?

I'm using Spring 4.1.6 with QueryDSL 3.7.4. I have created my Entities with Telosys Tools, and my QueryDSL entities with the apt-maven-plugin. I didn't used the @Query tag because I think if I do, I ...
0
votes
1answer
13 views

Connect to the db each time with a different user

I'm trying to increment the security of my website implementing the best security systems I can. I know that it's good to create different users with different privileges, but would be useful creating ...
0
votes
4answers
19 views

Creating a table in HTML using data from MySQL Database not working

I am trying to display a table on a webpage from MySQL database, but it's now working! Here's my code: <?php function list_schools() { $conn = mysqli_connect("localhost", "root", "", "...
0
votes
2answers
26 views

GROUP_CONCAT and LEFT_JOIN - filter records

The following query displays a list of soups and, for each soup, a list of the ingredients. //Query only for demonstration SELECT a.id_soup, a.soup, GROUP_CONCAT(DISTINCT b....
-1
votes
0answers
31 views

I need to add another column in my database but I don't know how to

I want to add another column in mysql either by using java or manually in the mysql application. This is my java code and I need to add a column named book_id package liblog; import javax.swing.*; ...
-4
votes
0answers
17 views

Python/R/C for large data management? [on hold]

I have an existing solution on PHP that was covering client's needs up to recent times. The project itself is a large array of data stored in MySQL tables, with analytical things built up on frontend ...
0
votes
2answers
23 views

ENGINE=InnoDB' at line 10 in SQL

I'm trying to create a table with this sql: CREATE TABLE angestellte ( PersonalNr int(11) NOT NULL AUTO_INCREMENT, Vorname varchar(50) NOT NULL, Nachname varchar(50)...
-2
votes
1answer
24 views

syntax error in mysql update query my syntax is correct

<?php $query2 = "update likeusers set like='$likeid' where uid='$uid'"; mysql_query($query2) or die(mysql_error()); $count = mysql_affected_rows(); echo $count; ERROR: incorrect syntax near 'like=....
1
vote
1answer
22 views

mysql display calculated average for all rows

Table structure rating.post_id rating.user_id rating.rate_like rating.rate_dislike Sample data: rating.post_id = 1 rating.user_id = 1 rating.rate_like = 1 rating.rate_dislike = 0 rating.post_id = ...
0
votes
1answer
12 views

Laravel Homestead - Connect to remote DB via SSH Tunnel

I want to develop locally using Laravel Homestead, but Laravel should be connected to a remote DB via SSH Tunnel, not the Homestead one. Somehow I cannot find out how to do so. Is it even possible?
0
votes
0answers
10 views

get variables from jsf query sql db display results on another jsf page [duplicate]

I have 2 jsf pages. one that displays all information from the vehicle table in the sql database. JSF PAGE 1 list_vehicle on the first page when you click on the view link on the right it will ...
0
votes
0answers
10 views

phpMyAdmin: Valid SQL --> View, Fails with “Commands out of sync; you can't run this command now”

I am working in phpMyAdmin. I have a query which executes successfully and returns exactly what I want. When I create a View with the same query, the View gets created successfully. However, only when ...
0
votes
2answers
19 views

Mysql Many-to-many (AND Where) select

i have this database setup: products id [fields...] tags id [fields...] product_tag id product_id tag_id If have this records in my database Products Product A [id: 1] Product B [id: 2] ...
0
votes
1answer
26 views

PHP run once and insert sql twice

My code is meant to take in a brief text and title from users and it is adding them into the database twice and can't understand why. <?php ("session.php"); ?> <?php require_once("...
0
votes
1answer
15 views

insert usernames to database using comma's

i have a on line multi player game php mysql flash drivin, i am getting winners player names via php and need to insert them to a db row using comma's or a space between the names so that i may fetch ...
0
votes
0answers
8 views

MySQL - one large query or multiple small ones

I'm hosting SA-MP Server. I have player variables which i should store in a database. I'm not sure if i should update the database at the moment when the variable changes or should i update the ...
0
votes
0answers
11 views

Signup page is showing user error as fatal error?

Error Image. I was trying to test and edit a Torrent site script knows as TBDev.net. Firstly, I made a database for this than configured the config.php file in includes folder like giving database ...
0
votes
0answers
13 views

JSON php parsing error [duplicate]

Help please, I´m new to JSON and php and I´m getting an error I don´t know why I get. What´s wrong with my code? <?php $host = "(My real info here)"; $user = "(My real info here)"; $...
0
votes
0answers
16 views

PHP Query Statement 3 Tables Join

I am quite stuck with one query statement. I have the current query: $user_id = $_SESSION["user_id"]; $stm = $db->prepare("SELECT votes.hasVoted FROM votes INNER JOIN posts ON posts....
-2
votes
0answers
18 views

can I connect to BOTH MySQL and MongoDB in my NodeJS app?

Is there a way to connect to BOTH MySQL and MongoDB in my Node.js application? The closest I found was an option called Node pool, but I don't think this is it.
0
votes
1answer
24 views

Loop through an array while looping through a query result

I have a PHP/MySQL request returning data (ie: called "my_request"). I fetch through the results, and there comes my trouble... For each result, I need to check if the value is also in a hard-coded ...
1
vote
1answer
25 views

Entity Framework Core Linq Where NULL does not work

I am using Entity Framework Core and Linq to write a query to get all entries where the EndDate property on my object is NULL. However, EF does not convert the query to the proper SQL to filter out ...
0
votes
1answer
12 views

MYSQL Random value between 1 and MAX value in Table

I need some help with a random variable in MySQL. I want it to pick a random value between 1 and the highest value in the table surnames. The solution eludes me.. SET id = ROUND(RAND()*((SELECT ...
0
votes
1answer
22 views

Passing values between forms in php

I have a php and mysql search where a user select a area and matching result are shown .then when user click on any one result i needed to pass the unique id or name to next form .the search part work ...
0
votes
1answer
47 views

Total sum of dynamic table

Good morning, everyone. I have a problem, I new to javascript and jquery, and I have to use a dynamic table for a jewerly store, adding rows, delete rows, and multiplying the price for the quantity ...
0
votes
2answers
14 views

SQL query adding where related to sub query

Trying to get a where statement on a sub query result. The below works as I want it to, with the exception of AND low_36 != NULL. I need this to stop results where the output of low_36 is NULL. ...
0
votes
1answer
16 views

error in inserting to mysql by php

i'm trying to insert to database and it gave me this : Error inserting You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax ...