Category "mysql"

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

How to name a SQL query?

My professor is asking for me to include a query name for each and every query that is involved with this homework. I'm assuming he's referring to an alias, so

Error Code: 1822. Failed to add the foreign key constaint. Missing index for constraint

I found some threads about the error. But all the solutions doesn't work for me. I created 2 tables a user table and one for articles. Now I want to store the

mysqldump with --where clause is not working

mysqldump -t -u root -p mytestdb mytable --where=datetime LIKE '2014-09%' This is what I am doing and it returns: mysqldump: Couldn't find table: "LIKE"

Store photos in mysql database with iOS app

I am looking for a how to create a mysql database with the photos which are uploaded by my iOS app. I have already programming the picker and the upload part, b

Update a column value, replacing part of a string

I have a table with the following columns in a MySQL database [id, url] And the urls are like: http://domain1.com/images/img1.jpg I want to update all