Data dodania Pytanie
2017-12-09 15:12 SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'payments' already exists (SQL: create table `payments` »
When I migrate a table I see this error, SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'payments' already exists (SQL: create t...
(2) odpowiedzi
2017-12-09 10:12 Why where clause doesn't affect of the query? »
Here is my code: $tracking_codes_obj = new TrackingCode; $tracking_code = 140; if ( !is_null($tracking_code) ) $tracking_codes_obj->where('tr...
(2) odpowiedzi
2017-12-09 09:12 Update value of attribute with count condition requirement »
I have a data query result from query select count(type_of_vegetation)as count,type_of_vegetation from tb_patrol group by type_of_vegetation as ...
(1) odpowiedzi
2017-12-09 00:12 Ordering of Comment section by multiple columns in MySql »
I have a comment-section on my site and I want the ordering to be: 1. if user has pinned the comment to the top I want those comment to show first 2. ...
(1) odpowiedzi
2017-12-08 20:12 Overwriting soft delete table column for a model »
I'm using laravel 5.4. I have a model that points to a database table that has the following attributes. id integer name varchar location ...
(1) odpowiedzi
2017-12-08 14:12 Combine multiple OR and LIKE mySql »
I understand that LIKE can not be used in inside IN clause from here. My table has col1, col2, col3 columns. How can I find multiple values in multi...
(1) odpowiedzi
2017-12-08 10:12 Node updating database field from dynamically generated form »
I currently have a ejs page that displays a table that consists of two rows (Ingredient, New Quantity), both of which are generated dynamically. A new...
(0) odpowiedzi
2017-12-08 09:12 Two databases in one DataContext with relations between databases »
I want to have one common database where are tables like Users, Employees and so on, and second database where I store some data (for example company ...
(0) odpowiedzi
2017-12-08 06:12 Priority/Cascading datetime without full table scan »
SELECT IF(priority_date, priority_date, created_at) as created_at FROM table WHERE IF(priority_date , priority_date , created_at) BETWEEN '2017-1...
(3) odpowiedzi
2017-12-07 12:12 Best way to exclude results from a big db query in Laravel 5.2 »
I'm using Laravel 5.2 to build a big product inventory and I'm having trouble with the query that will show the products. Here's the example: I have ...
(1) odpowiedzi
2017-12-07 07:12 Conversion of Array and objects to bulk insert in mysql Sequelize + Nodejs »
This is my json object: { "groups": [ { "id": 1, "groupname": "Angular", "createdAt": "2017-12-...
(2) odpowiedzi
2017-12-07 07:12 How to use Ruby Sinatra + ActiveRecord to read .sql file and extract the content? »
I'm familiar with Sinatra but I am completely new to ActiveRecord and Database stuff, I'm trying to use ActiveRecord from a .sql file full of data wit...
(0) odpowiedzi
2017-12-07 00:12 Pros and cons for MySQL snapshots vs SQL dumps »
What are the advantages/disadvantages of using database snapshots vs. backing up SQL dumps (from mysqldump)? I find SQL dump files easy to backup and...
(1) odpowiedzi
2017-12-06 21:12 Count multiple items in the same column pulling data from 2 tables - mysql »
I have 2 tables and I need to count the number of times any role shows up in each movie Example of Tables: Movie Table TITLE MOVIEID ...
(2) odpowiedzi
2017-12-06 15:12 Workaround solution to do a "INSERT...ON DUPLICATE KEY UPDATE" with null value on unique key »
To begin with, here is my code structure and what I want to achieve : I have this 3 tables : +----------------------+ | CONFIG_CAMPAIGN | +----...
(1) odpowiedzi
2017-12-06 10:12 laravel - inserting id from one table to another right after submitting a form »
Since I'm new in Laravel (started using this framework 2 weeks ago), I'm having a hard time inserting an id from one table to another right after subm...
(2) odpowiedzi
2017-12-06 07:12 MySQL Error Code: #1111 - Invalid use of group function »
I am trying to write a mysql query to select at least two or more than same user subscription.Here's the query: SELECT a.* FROM `subscription` a, u...
(1) odpowiedzi
2017-12-06 04:12 Why i cannot pass json data to an ejs template? »
I'm working on an app using node js and mysql I have the following function: function processInfo(req, res){ //connectig to the db var db = mysql.c...
(0) odpowiedzi
2017-12-06 01:12 ActiveRecord could not connect to database server when running Rspec »
So I'm running rspec tests with jruby-1.7.16.1 after completing a bundle install, and they are all failing to the same error: Failure/Error: Una...
(1) odpowiedzi
2017-12-05 20:12 Configure the connection_collation with SQLAlchemy »
I'm attempting to get SQLAlchemy to connect to MySQL with a collation_connection of utf8mb4_unicode_ci. My sever and database are both using the utf...
(1) odpowiedzi
2017-12-05 18:12 Precision MySql in division »
mysql> SELECT CAST(1 / 3 AS DECIMAL(21,20)); +-------------------------------+ | CAST(1 / 3 AS DECIMAL(21,20)) | +-------------------------------+ ...
(1) odpowiedzi
2017-12-05 18:12 Rails 4.2: Turn a reference field into foreign key »
I'm maintaining an old system that uses Rails 4.2 and for an unknown reason the references are created this way: t.references :credit_card, null: f...
(1) odpowiedzi
2017-12-05 06:12 How to get Woocommerce Variation ID? »
I've already had this code on functions.php This code is to add a new field on each product variation to have datetime input field, so variations wou...
(2) odpowiedzi
2017-12-04 16:12 Should I use multiple databases for single project »
I am working on a site which provides coupons for online shopping sites. It provides discount coupons for shopping sites in India. But now the client ...
(2) odpowiedzi
2017-12-04 12:12 Improve speed execution of MySQL select query »
I have 2 MySQL tables with several millions of rows and I'm trying to perform a query selection for get specific data column from both tables. Despite...
(2) odpowiedzi
2017-12-04 11:12 Perl DBI (MySQL) puts single quote instead of actual parameter in prepared statement »
I'm trying to do a simple query as prepared statement but have no success. Here is the code: package sqltest; use DBI; DBI->trace(2); my $dbh = ...
(1) odpowiedzi
2017-12-04 11:12 How to write a MySQL before insert trigger to insert data in a table? »
I need to create a trigger for when I insert data in the first table to be able to insert in the second some data related to the first one. CREATE TR...
(1) odpowiedzi
2017-12-04 09:12 Error serialization exceeds the max collection object nest level of '25' »
i have an Flex application which is using Coldfusion 10 as backend for manipulating data in a MySQL Database. Since some days I am getting intermitten...
(0) odpowiedzi
2017-12-03 19:12 Subtraction of Date in angularjs »
I want to subtract two dates in angularjs which are getting fetched from database. The code works fine for all values except subtraction between dates...
(1) odpowiedzi
2017-12-03 17:12 SQL get unique id per user »
How can I group the statement by their user_id, i keep getting duplicates of 2 and 3 already used a group by on the user_id? What seems to be the erro...
(3) odpowiedzi
2017-12-03 14:12 How to get all rows of a table that share a value on a specific field? »
For Example If i have a table named students that has 4 fields id,fname,lname and dob (date of birth) How can I retrieve all students' names that sha...
(6) odpowiedzi
2017-12-03 11:12 How can I check matching two values in a pivot table? »
Here is my code: $role_id = Auth::user()->role_id; $page_id = Page::where('path', $request->path())->where('method', $_SERVER["REQUEST_METHO...
(1) odpowiedzi
2017-12-02 17:12 Why do these queries return different results? »
SELECT DISTINCT productName, listPrice FROM product WHERE productID IN (SELECT productID FROM saleItem WHERE quantity = 2) AND productID NOT IN (S...
(4) odpowiedzi
2017-12-02 14:12 SELECT COUNT query throws error in MySQL »
I have a database named webshop on localhost with several tables in it. When I run the query: SELECT COUNT (userId) FROM users; It trows me the foll...
(3) odpowiedzi
2017-12-02 03:12 Mysql error on sql like operator rails »
I get an error Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right...
(1) odpowiedzi