Lavarel 5.2 Conditional Update to Database

MySQL
How do I update a database column based on a value from a different column? I have a query like the following which pulls current usage (example: 200...
10 months ago

Table column name with regular expression using mysql

MySQL
Please let me know is that possible i am use regular expression or another idea to set query like, select name_en,name_ar,desc_en,desc_ar from table_...
10 months ago

Is it secure to Store value in var for PDO PHP?

MySQL
I wonder if it secure to store value for a prepared query like that : $notGood = 'yes'; $req = $pdo->prepare('SELECT id_user, name_user, tel_user,...
10 months ago

MySQL MATCH AGAINST not working

MySQL
I'm actually working on a website where there are two tables, almost identical, where MATCH AGAINST works on one but not on the other. To find out wh...
10 months ago

delete mysql using button and ajax

MySQL
I want to delete files in my database instantly when I put press button. Files were delete but I am obliged to refresh navigator. Ajax doesn't operate...
10 months ago

How to find time intersection between two times stored in mysql database

MySQL
The problem I'm facing is not very complicated and there are several answers to this here, but I didn't see any which is solving the problem as I need...
10 months ago

Mysql query with if exists check in where clause

MySQL
I have two tables (A and B) where my query compares a calculation from table A with a range in table B and then insert a corresponding value to the ra...
10 months ago

mysql query to count from related tables twice

MySQL
I'm having a problem getting my query the way I want it. I have 2 tables: Passages and Questions tables The questions table has a foreign key of a P...
10 months ago

Self-refering table. MySQL

MySQL
I have another question. I don't seem to fully grasp the concept. I have a table: EMPLOYEES | EMP_NO | APELLIDO | OFFICE | DIRECTOR | START_DATE | ...
10 months ago

How to format MySQL datetime to angular2 useable date format in Ionic 2?

MySQL
I am trying to format a mysql datetime that looks like this: 2016-05-27 20:17:45 to an useable date format for angular2. After reading some comments h...
10 months ago

Selecting minimum time for each unique column value where user is not banned

MySQL
I have a bunch of player records, a bunch of world records, and a bunch of banned players: describe records +--------+---------------+------+-----+-...
10 months ago

Query with subquery and having count(distinct) condition

MySQL
I'm attempting to create a query that lists the name and id of every horse which has finished in the top 3 in an event 2 or more times. These are th...
10 months ago

Filename stored on MYSQL is wrong for some reason

MySQL
I am getting a error in link genrated when fetched is beign fetched from database image of error here is code to fetching image echo "<img src='...
10 months ago

mysql. I want to get the max value of all rows with a specific date and use the corresponding fields

MySQL
My table 'players_online' id | count | date | time | day | max-players 0 | 55 | 26/05/16 | 13:00 | 5 | 300 1 | 33 | 26/05/16 | 13:...
10 months ago

Form field value not sent on update

MySQL
I have a form that allows a user to input scores for multiple students and specify which test (either test1, test2, or test3) the scores would be reco...
10 months ago

MySQL CROSS JOIN : Every Derived Table Must Have Its Own Alias

MySQL
I am trying to make a CROSS JOIN between "Selected" columns in two tables, For example : Table 1 (a, b, c) -- Table 2 (a, b, d) I want to select a an...
10 months ago

'mysql' is not recognized as an internal or external command, operable program or batch file

MySQL
Please help me. D:\wamp>cd D:\wamp\bin\mysql\mysql5.6.17 D:\wamp\bin\mysql\mysql5.6.17>set path=%PATH%;D:\wamp\bin\mysql\mysql5.6.17 D:\wamp\bin\my...
11 months ago

PHP Upload script is not posting

MySQL
I have a PHP image upload script. The uploading part of the script is working, but when I try to upload the $newname of the image to the database it i...
11 months ago

Where is "latin1_german1_ci" collation coming from?

MySQL
I'm receiving the following error message from a Java/Spring/Hibernate application when it tries to execute a prepared statement against a mysql datab...
11 months ago

Select rows in table A that junction to all of a set of items from table B

MySQL
Based on this image (forget "genre" though): I have a list of actors, and need to retrieve a list of films that contain every actor on my list. Exam...
11 months ago