Category "mysql"

Select a column with a keyword name

I have a table named 'test' It contains a column named 'AND' For that I use the following queries insert into test values ('a','abc'); insert into test value

MySQL subquery overview

Alright I am guessing I need a subquery to solve this and I am little rusty on these. So I have 3 tables: tblAccount - Has User information and AccountID tblIte

Why mySQLclient is not installed

I want to install the MySQLclient package on my Cpanel host through the terminal. Because I want to connect my Django project to the database. When I want to in

Access denied when making connection from php container to mysql container

I’ve been searching the web for hours but do not find any solution to my problem. I have 3 containers: - nginx - php - mysql They are all connected to th

MySQL Syntax Error when Select Count into inout Variable

Here is the code: CREATE PROCEDURE CountOrderByStatus( IN orderStatus VARCHAR(25), OUT total INT) BEGIN SELECT count(orderNumber) INTO total FROM orders WHERE

Laravel Unknown Column 'updated_at'

I've just started with Laravel and I get the following error: Unknown column 'updated_at' insert into gebruikers (naam, wachtwoord, updated_at, created_a

Select COUNT (*) fails if no result

I'm trying to do a simple query (below) to see if there are no rows found in a table. If there are none, then do something. SELECT COUNT (*) as count FROM AT_v

No Dialect mapping for JDBC type: 1111

I'm working on a Spring JPA Application, using MySQL as database. I ensured that all spring-jpa libraries, hibernate and mysql-connector-java is loaded. I'm ru

AWS MySQL connection frequently times out

I have a MySQL database in AWS (RDS), and I connect to it from command line via this command: mysql -u _usernme_ -p_mypassword_ -h _aws_mysql_host_ _dbname_

The MySQL "DELIMITER" keyword isn't working

Ok so, I've been ripping my hairs ou on this one, why doesn't this work? DELIMITER | CREATE PROCEDURE Decrypt_pw() READS SQL DATA BEGIN SELECT 'Hey Sele

mysql - Need to allow '0000-00-00 00:00:00' dates

I want zero dates to be allowed in MySQL. I have changed the sql_mode to ALLOW_INVALID_DATES,NO_ENGINE_SUBSTITUTION. I have changed it in /etc/mysql/my.cnf.

How to map the two arrays with a duplicate value?

I have two arrays. $array1 = ['id_e' =>[91707, 91708]]; $array2 = ['id_s' => [18, 57]]; If I want to insert or delete into the database, I want to make

How to test an SQL Update statement before running it?

In some cases, running an UPDATE statement in production can save the day. However a borked update can be worse than the initial problem. Short of using a test

Different types of POST requests in the same route in Flask

I want to have a page on my website where you have multiple buttons that send a different POST request to modify some part of my database. Currently, only the

get latest record for each ID

I would like to get the latest record for each server. Here is some example data: TimeGenerated SourceName ComputerName Message 2014-11-22

get latest record for each ID

I would like to get the latest record for each server. Here is some example data: TimeGenerated SourceName ComputerName Message 2014-11-22

How to make a prepared statement without explicit quotes in case of string variables

I use MySQLdb library. When I make a query like this cursor.execute("SELECT COUNT(*) FROM srcdst WHERE TABLESRC = ?", src) where src is a string variable, I ge

Make survey at laravel 5.4 and MySQL

I need to make a survey for my website. I have this: Route: Route::resource('survey','surveyController'); Controller: public function index() { $show=surve

MySQL to update an XML attribute

In data load, it seems some XML attributes mapped incorrectly and I'm now trying to correct this, but am struggling with MySQL's handling of this XML column. I

Error: Packets out of order. Got: 1 Expected: 0

All the Solutions I found for this Problem don't work for me. I'm just loading one Dataset and after approximate 150 Request I get this Error: Error: Packets o