connect my spring boot project to a mysql database

I am trying to connect my spring boot project to mysql database but i keep encountering an error but cant seem to work out what it is. spring.jpa.hibernate.ddl-auto=create spring.datasource.url=jdbc:mysql://localhost:3306/mydb?useSSL=false spring.da...
more »

2017-10-04 17:10 (2) Answers

Recover mysql root password on a Mac OS

I start my MAMP, and try to connect to my mysql server via localhost or 127.0.0.1, I tried all the possible password that I thing it is correct, but for some reasons it still didn't like it, so I think I forgot it some how. I need help. Try #1 En...
more »

2017-10-04 14:10 (1) Answers

Turn SQL date red if it's not the current date

I'm creating a simple PHP to do list. I want to turn the date red if it's not the current date. Here's part of my code, with the HTML removed: <?php include "connection.php";?> <?php if ($_SERVER['REQUEST_METHOD'] == 'POST'){ $task = iss...
more »

2017-10-04 06:10 (1) Answers

NodeJS async/await class mysql/mariadb

I tried to something I thought would be simple using: nodejs 8.6, MariaDB, MySQL2/promise and classes. But it does not work: Here is the simple example: const mysql = require('mysql2/promise'); class mySQLClass { constructor() { this....
more »

2017-10-04 00:10 (1) Answers

MySQL incorrect timestamp value

I'm trying to insert datetime value '1970-01-01 00:00:01' in timestamp column but MySQL returned an error "Incorrect datetime value: '1970-01-01 00:00:01' for column 'timestamp'" CREATE TABLE TST_TABLE ( tst_column timestamp NULL ) INSERT INTO TS...
more »

2017-10-03 17:10 (1) Answers

How to do join with 3 tables in CakePHP 2.x

I am new in cakephp and I would like to do join with cakephp version 2.x. I have 3 tables : users = id, username, pass, groupd_id, role projects = id, name, start_date, end_date, category assigns = id, project_id, user_id I would like to do like...
more »

2017-10-01 15:10 (0) Answers

Sort by multiple columns MySQL

I have a table in which I have three fields with data type INT, INT and INT. I want to sort my select query using all these three columns. Sort by ASC if field A <= 10, sort by DESC field2 and sort by ASC field 3. SELECT * FROM table1 WHERE id=u...
more »

2017-10-01 13:10 (1) Answers

laravel whereHas results weird

product model public function country() { return $this->hasMany('App\Models\ProductCountry', 'product_id', 'id'); } the controller $product = Product::where('mall_' . $this->mall_id, '=', 1) ->whereHas('country', func...
more »

2017-09-29 17:09 (2) Answers