返回首页
We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [mysql]

MySQL is a free, open source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL). DO NOT USE this tag for other DBs such as SQL Server, SQLite etc. Those are different DBs which all use their own dialects of SQL to manage the data.

Filter by
Sorted by
Tagged with
0
votes
0answers
3 views

How to work with mysql cursor when you are dealing with a huge number of columns?

I am writing a procedure to convert data from multiple smaller tables into a 'flat' table with many columns(~100). I have a cursor defined which reads/joins data from smaller tables. So far I have ...
-1
votes
0answers
12 views

How do I store in PHP Session informations into my MySQL database?

I am trying to get the Username of a user and log the Session where the username is saved. How do I can store it in the database? I tried to select the user that would be logged and get it from the ...
0
votes
0answers
5 views

Insert common SQL query along with multiple functions

I'm inserting an SQL Template in a new database through PHP code using the mysqli->multi_query() function. This SQL Template contains something like: CREATE TABLE `applicants` ( `id` int(11) NOT ...
-1
votes
1answer
10 views

MySQL average child records by month

I have two tables: sales_header (contains a created_at date) sales_line I want to count the average number of lines on headers per year/month. The basic query to get header count per month is easy: ...
0
votes
0answers
2 views

Odd Lost connection to MySQL server at 'reading initial communication packet'

I'm aware this issue has been raised multiple times, but I've checked most of them and couldn't find the solution in my scenario. Often, the issue is a connection issue between a MySQL listening on ...
0
votes
0answers
9 views

How to get nearest DateTime from 2 tables

I want to build a query to get the nearest datetime for 'tag' entries against a 'tick' list: TickID,DateTimeTick Tick01,2018-10-30 13:00:00 Tick02,2018-10-30 14:00:00 Tick03,2018-10-30 15:00:00 ...
0
votes
1answer
22 views

SELECT from table AND 'archive' table at once

To reduce the size of one of our tables (currently over 4 million rows), I've created an 'archive' table which will only be accessed by certain users. The archive table is a replica of the main table,...
0
votes
0answers
6 views

Connection attribute for JDBC MysqlDataSource is null in Camel test

I want to access my local MySQL database using Camel. I'm doing something wrong when initializing DataSource: I set all of the necessary attributes, and I call getConnection(), but the connection ...
1
vote
2answers
17 views

Laravel login timing out

After starting up a new Laravel project, creating the UI with bootstrap, and setting up the auth controllers using: php artisan make:auth I ran the database migration and seeded a user which came ...
0
votes
0answers
10 views

SSHTunnel and MySQL.connector in Python failing

I'm trying to use the MySQL connector in Python, through an SSHTunnel, and I'm getting a MySQL Connection not available. error. It seems to be talking to the server (I get an access denied message if ...
-2
votes
1answer
26 views

download and upload mysql database in PHP [on hold]

I'm working on a project and my professor INSISTS on me, creating an html interface(button and input file) to mimic IMPORT AND EXPORT capability of phpMyAdmin. I need to create a button that when ...
-1
votes
2answers
28 views

How to SELECT DISTINCT *

Is this a possible query? Currently, every product from my database is being listed on the home page of my website and a lot of them are duplicates since a product can belong to multiple categories. ...
0
votes
0answers
22 views

I have a problem in updating student semester after they passes the exams and goes to next semester

I am working on a project of university management system I want that my system be an automatic so after 4 month the students that passes the semester the semester should increments and when again I ...
-1
votes
1answer
25 views

Error : mysqli_query() expects parameter 1 to be mysqli [on hold]

I am a beginner for php developer. I was getting this error : mysqli_query() expects parameter 1 to be mysqli, null given in C:\Users\fatin\Desktop\xam\htdocs\solvenow\Forum.php on line 37 I try ...
0
votes
0answers
5 views

Restart backup - CentOS 7

My server stopped and there was an error: Error: Disk Full (/tmp/#sql_40a_1) So I removed some backups and there is free space then I restart server, but now I can only see errors like this: ...
0
votes
1answer
12 views

Node express mysql second route call crashes

I am trying to set an API. when the default route is called, with '/', the route can be called several times but the route '/count' can only be called once before crashing with this error: /Users/...
0
votes
0answers
16 views

Can't connect to the opened outer port from docker container - Error: connect ECONNREFUSED 127.0.0.1:3306

I have ran ubuntu docker-containers (mysql) and (nodejs server app) on windows docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS ...
-2
votes
0answers
24 views

make log in page using php and html with mysql? [duplicate]

this is an HTML code <input type="text" name="u" placeholder="Username" required="required" /> <input type="password" name="p" placeholder="Password" required="required" /> <button ...
0
votes
0answers
10 views

NodeJS, MySQL - JSON Stringify - Advanced query

I have an object in the table column saved using JSON.stringify and it looks like this: [{ "id": 1, "uID": 10 }, { "id": 2, "uID": 10 }, { "id": 3, "uID": 94 }] I need a ...
0
votes
0answers
10 views

MySQL SSL connection works in ubuntu 16.04 but not 18.04?

I am using the following command to connect to a MySQL instance (sensitive info anonymised) mysql \ --ssl-ca "~/certificates/ca_cert2.pem" \ --ssl-cert "~/certificates/client_cert.pem" \ --ssl-key "~/...
0
votes
1answer
8 views

Mysql Error Code 1265: Data truncated for column after increasing varchar column size

I have a varchar column in a table that was varchar(1000) and was increased to varchar(6000). After updating this table, I get this error mentioned when trying to update a specific row in the table. ...
0
votes
1answer
12 views

How can I update a surrogate key based on an older entry of a table

I have a table called player_stage. I am trying to prepare my data so I can put it into a data warehouse. I currently have a unreliable work-around that involves a duplicates view and handpicking the ...
0
votes
1answer
18 views

Maintain data integrity between MySQL and Redis

I have this eCommerce application that can process orders and deduct the stock value. This is legacy code and I can not change the technology stack. I have difficulty to manage data integrity because ...
-1
votes
0answers
23 views

Fetch mysql data from text area values array

I have a textarea in a form. I get some value with some variable from this textarea. I can get those variable as php array. I want to fetch mysql data with those array. like: textarea: ...
-2
votes
0answers
23 views

Can a MYSQL database user enter in a Web Application with its credentials?

If I have a database "Movies" and I have 3 different users I created using the Create User... identified by ... " command. Users are "A" "B" "C" with different roles, and a table inside this ...
-1
votes
0answers
14 views

error in php Trying to get property 'id' of non-object in [duplicate]

hello all I don't know how to fix this error. Can someone help me? The foreach in the page foreach ($normativa as $row) { echo '<div class="card"> ...
0
votes
0answers
8 views

Kinesis Analytics Writing User Defined Functions

The documentation is pretty poor for UDF's (http://docs.aws.amazon.com/kinesisanalytics/latest/sqlref/sql-reference-create-function.html). How would I go about writing a UDF with variables and such ...
0
votes
1answer
23 views

Selecting value with multiple options in one column

I need to select values like 'OTH%','90%', AND '81%' in the roytecp_n column if the date range is between now and 28 days. If it's greater than 28 days then I need to select the values Like '89%' OR ...
-1
votes
1answer
44 views

SQL query involves three tables [on hold]

In my MySQL database, I have three tables students, classes, courses. One class has many students. One class has many courses. The courses table has one boolean field active, and a string field ...
-2
votes
1answer
16 views

duplicate rows count among two tables in MySQL based on column value

We have two tables salary salarytwo I need to find the duplicate records count from the two tables based on employeename. If employeename is same in the multiple rows, it will be considered as ...
0
votes
1answer
28 views

SQL: combine two columns into one query result

I have a table that represents cameras' configuration. Say that a camera with primary key x has the following configuration, as a json string which I later use as a dictionary in python: {A:[...], B:[...
0
votes
0answers
18 views

mysql variable defined but need to make it so the variable can be multiple values

without adding a ton of code in here. I have an APEX application where I have a select list, where I want to select multiple codes from that list, and in return they populate a chart. I have it ...
1
vote
1answer
41 views

two tables into one?

My question is simple I just want to joint two tables into one table without any PK first table is completely different they have nothing same table1. table2. |в|q| |@|John | ...
-1
votes
1answer
17 views

Query a mock Facebook SQL database for gender and location for a specific user returning 2 rows & 1 row with 2 columns?

How do I: Query this to return the number of male friends living in Canada, and all the female friends for a given user: A) Query that would return 2 rows -- one for each number, and, B) Query ...
0
votes
1answer
13 views

Cannot create stored function

When I try to run this code : DELIMITER $$ create function formatJJhhMMssToSuffixes(duree varchar(100)) returns varchar(100) begin DECLARE hhmmss VARCHAR(100); if duree = '' then ...
-1
votes
1answer
32 views

when i enter the username and password CORRECTLY it brings me over to the index.php?error=wrongpwd, wehn it should be saying ?login=success [duplicate]

<?php // this is obviously just an includes file called login.inc.php. if (isset($_POST['login-submit'])) { require 'dbh.inc.php'; $mailuid = $_POST['mailuid']; //I also checked if all ...
0
votes
1answer
13 views

Get correct current user in mysql under another account

I(with root account) create some procedure myproc which has some part of code below: declare cur_uname varchar(20); select substring_index(current_user(),'@', 1) into cur_uname; Then I create ...
0
votes
1answer
15 views

MySQL triggers different database different server

I have two sites in two different servers, one live site and another dev site. I want to set a MySQL trigger in the live database table which updates the dev database table in the time of Insert, ...
1
vote
2answers
40 views

Extracting a pack size from a column with mixed formats

I have a column pack_size in a table called product_master_test. The problem that I am facing is that the pack_size is in mixed formats, there is no uniformity to it. For example: 4 x 2kg (pack ...
0
votes
0answers
19 views

Looking for Duplicates & Marking off used records

I had asked this question on reddit on Friday; unfortunately I hadn't made any headway on the matter, so I've decided to ask on here. I'm tasked with finding records which have duplicate entries, ...
-2
votes
0answers
15 views

Connection ODBC to My SQL - SQL Server error: 11 [on hold]

I'm trying to connect MSAccess with MySQL online: here for the data test: Username: **** Database name: gBcABkdz2o Password: **** Server: remotemysql.com Port: 3306 When I'm going to create the ODBC ...
0
votes
1answer
16 views

SQL Get associated data from a third table

I would like to know how to get a result that show me all the orders, all invoices associated to every order and all payments associated to every invoice. I got the orders and their related invoices ...
-1
votes
0answers
10 views

IS-A Model SQL Alternatives [on hold]

I'm comparatively new to studying databases. I understand the IS-A model but I was wondering if there are any alternatives? I came across something like subclass/superclass but don't understand much. ...
2
votes
2answers
30 views

Getting ratios in mysql without subqueries

I would like to run a query from the tables below that gives me the ratio of the amount paid from the executive offices to the total amount due: CREATE TABLE offices ( name VARCHAR(255), ID ...
0
votes
1answer
15 views

Power BI Query: Need to Select Columns in Table 1 based on list of column names in Table 2

I have merged data from two tables (Table#1 and Table #2) into single master data table (Table #3) using power query. Table #4 and Table #5 contain list of column names from Table #1 and Table #2, ...
-2
votes
0answers
28 views

Unable To Update Table From Multiple Checkbox Value

<?php $teachingperiodid = $_POST['unit_teachingperiodid']; $popimp = implode(',', $_POST['vehicle1']); $pops = explode(',', $popimp); foreach ($pops as $pop ) { $query = "UPDATE ...
0
votes
0answers
9 views

sshtunnel in python - Windows & ubuntu

server = SSHTunnelForwarder ( ('host',host-port), ssh_username="user", ssh_password="password", remote_bind_address=('127.0.0.1', 3306), local_bind_address=('127.0.0.1', 3307) ) ...
0
votes
1answer
39 views

How do you return max values by day in MySQL?

Environment Table agent_poll records the total calls a call centre agent makes, polling the telephone system every 1 second to request the updated total. This provides many records per agent per day. ...
0
votes
2answers
20 views

Merge consecutive identical rows

So I have the following table. DATE price_usd price_eur ------------------------------------------ 2019-11-06 00:00:00 0.00000000 0.01000000 2019-11-06 00:00:00 0.01000000 0....
0
votes
0answers
8 views

Mysql Router Always sends all the requests to Primary(Read and Write) Node Only

I am using mysqlrouter version 8.0.18 in ubuntu 16.04 LTS, i have already setup mysql 5.7 innoDb cluster with two nodes which is working well i have attached the cluster status here cluster status ...

返回首页
杏彩计划 杏彩官网 杏彩APP 杏彩走势图 杏彩下载 杏彩官方 杏彩网站 杏彩怎么玩 杏彩官方 杏彩靠谱吗 杏彩代理 杏彩骗局 杏彩投注 杏彩倍率 杏彩开奖 杏彩漏洞