Data dodania Pytanie
2017-06-03 07:06 How to add case statement to add break after every record? »
There should be a break after every row LIKE 'A%' when find next records of LIKE 'B%'. $stmt = $con->prepare("SELECT * FROM fistevent WHERE Event...
(3) odpowiedzi
2017-06-03 04:06 MySQL float type range and precision confusion »
I'm learning MySQL and having problem with float's range and precision. From the mannual: For FLOAT, the SQL standard permits an optional specifi...
(1) odpowiedzi
2017-06-02 17:06 Sorting Data in Table by Column mysql and wordpress »
I am trying to sort the table by scores in ascending order. Here is the table : Here is the code I'm using $sql = "SELECT * FROM scores"; $myD...
(1) odpowiedzi
2017-06-02 13:06 Entrust with Laravel - Eloquent queries with conditional roles »
I'm having single User eloquent model in my Laravel App: I'll be using Entrust for roles. Users can have multiple roles. I already managed to get th...
(0) odpowiedzi
2017-06-02 11:06 mySQL: Finding average after removing top and bottom nth% of data »
I have a table with 3 columns: list_num, sales_price, and days_on_market I want to run one query that will output a single number for the average of ...
(1) odpowiedzi
2017-06-02 08:06 SQL - Add up column value singletable »
I have a table Like This Id|purchase_date | Purchase_price 1 |02-May-17 |$10.00 2 |02-May-17 |$20.00 3 |02-May-17 |$30.00 I want to wri...
(3) odpowiedzi
2017-06-02 01:06 SQL: Select rows that were not selected in a previous query »
SELECT * FROM table ORDER BY id ASC Will output the full table: id name weight -- ---- ------ 1 XXL 450 2 L 20 3 XL 30 4 XXL 875 5 S 2 ...
(2) odpowiedzi
2017-06-02 00:06 Select where max Mysql »
help please make sql select to database. There are such data. My table is: id news_id season seria date_update ---|------|---------|-----|-----...
(2) odpowiedzi
2017-06-01 16:06 SQL, convert integer for Timestamp subtraction »
Assume we have a relation R(A, B), with A contains int values and B contains Timestamps. We have to calculate: (time in B in minutes) - (int to minut...
(1) odpowiedzi
2017-06-01 12:06 Return Value from sql commands »
I am currently using the SQL command Select * from where name='john' Is it possible to return 20 no matter the query, for example Select * from wh...
(3) odpowiedzi
2017-06-01 08:06 Use AJAX to make a database query on Node.js »
I'm using Node.js as server with Mysql as database for storing logged in usernames. Can I use AJAX to make a sql database query and return the list of...
(1) odpowiedzi
2017-06-01 06:06 Obtaining database joined table with limit »
Ive been trying to join two tables but only showing a limited amount (2) of results from the joined table. Unfortunately I havent been able to obtain ...
(3) odpowiedzi
2017-05-31 22:05 Mysql order by many columns then randomize »
I have a query ordered by 4 columns with asc or desc. I would like order the resulting rows random if there are two rows with equals values. I.E. (wi...
(0) odpowiedzi
2017-05-31 15:05 Use COALESCE within SUM in MySQL SELECT statement »
I have the following tables: Table users id name base_discount 1 jack 10 2 michael 20 3 richard 30 Table item id name category...
(1) odpowiedzi
2017-05-31 15:05 SQL Order By month name chronologically instead of alphabetically »
I would like to get the month names to be in chronological order instead of alphabetically ordered. Here is my Sql code. SELECT month, sum(total) F...
(3) odpowiedzi
2017-05-31 12:05 How to convert SQL with CAST function to Eloquent »
I have a problem with this sql. SELECT wp_posts.* FROM wp_posts JOIN wp_postmeta ON wp_posts.ID = wp_postmeta.post_id WHERE wp_posts.post_date > '...
(1) odpowiedzi
2017-05-31 09:05 How to track every user database interaction in laravel 5? »
If any logged in user accesses any service then I want to track all queries run by this user. Example: If user1 logs in and wants to delete his prof...
(1) odpowiedzi
2017-05-31 00:05 Records with time stamps 10 seconds a part »
I have some SQL data in a table running MySQL and below is what it looks like when I export with MySQL WorkBench. I saw the Count number of rows tha...
(1) odpowiedzi
2017-05-30 20:05 Internal Linking to children in a list »
Using fullPage.js (a jQuery scrolling menu), I have the following situation: I have an unordered list - the source of which is an SQL database (using...
(1) odpowiedzi
2017-05-30 11:05 Group By records based on start date and end date with count Rails »
Suppose, its May 2017 and I want to get records of April 2017. My query fetches the record of April 2017 with count but I want to include empty date...
(3) odpowiedzi
2017-05-30 09:05 How to check whether column value is NULL or having DEFAULT value in Mysql »
I want to fetch records for column value not equal to null and column value not equal to default value. I know that we can use SELECT * FROM table W...
(4) odpowiedzi
2017-05-30 07:05 Filter sql records on multiple time periods in codeigniter and mysql? »
Table Group_Users id | user_id | join_time | left_time ----------------------------------------------- 1 | 123 | 2017-05-29 15:26:00 |...
(2) odpowiedzi
2017-05-30 06:05 How do I delete rows of data from mysql table automatically with 24 hours after data into table? »
For example, i have a data input program And I want to delete my data automatically after 1 day of this data I input. how I do that? Someone can expla...
(2) odpowiedzi
2017-05-29 19:05 update product quantity in MYSQL using Eloquent »
I'm creating a simple ecommerce app using php, utilizing Laravel's Eloquent ORM. I have a cart class that creates an object with three properties, the...
(2) odpowiedzi
2017-05-29 19:05 Too many connections error with Laravel 5.4 and Mariadb »
I have recently upgraded my laravel app from 5.1 to 5.4. My server is now on PHP 7 and Maria db 10.1.22. Now I am getting a really weird error. Someti...
(2) odpowiedzi
2017-05-29 17:05 for each loop help in Rails. Trying to count data in each table. »
Quick one. How can I pull in the number of courses that are completed to show in a for each block in the a view. Currently as the code loops through a...
(1) odpowiedzi
2017-05-29 15:05 Need to insert 100000 rows in mysql using hibernate in under 5 seconds »
I am trying to insert 100,000 rows in a MYSQL table under 5 seconds using Hibernate(JPA). I have tried every trick hibernate offers and still can not ...
(4) odpowiedzi
2017-05-29 10:05 Codeigniter how to avoid duplicates showing one to many relationship »
I have been trying to show rows without duplicates but the query isn't working properly. I think the problem is one to many relationship, because one ...
(2) odpowiedzi
2017-05-29 09:05 Django1.10 cannot save korean characters(Mysql) »
I got the error below in django when saving a field with Korean character in the admin panel. OperationalError at /admin/blog/post/add/ (1366, "Incor...
(1) odpowiedzi
2017-05-28 22:05 in Laravel DB, which of get with count vs get without count is more efficient? »
Now there are 2 ways of get from Laravel Database. And I want to know which is more efficient. 1. get with count $cnt = \App\Models\Res_Times::where...
(2) odpowiedzi
2017-05-28 20:05 HTML select change value based on Database entry with vbhtml »
i want to edit some Data in a HTML select Element: <select id="Photoshop" name="Photoshop"> <option selected value= 0> &l...
(1) odpowiedzi
2017-05-28 11:05 Archive some entities with inheritance »
I have a hard problem to solve and I don't know how to do it. I want to archive some entities and then delete them from initial tables. Problem is th...
(0) odpowiedzi
2017-05-28 09:05 how to use mysql variable inside select statement / how to use 'as' variable in next select »
select count(invoice.id) as count_invoice_id, // i want to simply use count_invoice_id instead of using count(discount_offer.id) again inside the if ...
(1) odpowiedzi
2017-05-27 22:05 What is wrong with my SQL code on CONCAT? »
CREATE VIEW ‘CustomerView’ AS SELECT FROM ‘Customer’ ORDER BY ‘CustomerID’, CONCAT(‘FirstName,’ ‘ ’, ‘LastName’) AS ‘Custome...
(2) odpowiedzi
2017-05-27 20:05 Syntax error for UPDATE Table »
It's since 2 hours that I am working with an UPDATE TABLE statement which gives me always Syntax error. I made this: String falseValue = "False"; Str...
(1) odpowiedzi