Manipulate JSON data using AngularJS

hope you well.. I have an API made using php, to grab from SQL and convert it to JSON which is working fine. My only problem was, i can't manipulate this php to fetch JSON like i wanted. The solution i believe just a placement in the $outp at my api...
more »

2017-11-11 23:11 (1) Answers

Why MySQL return column name with quotes?

i have this: ... SELECT `id`, `name`, `user_id`, `xml_tables` ... and when making the query, I recive this: +- ----+------+---------+------------+ | `id` | name | user_id | xml_tables | +------+------+---------+------------+ |...
more »

2017-11-11 23:11 (2) Answers

Use auto incremented ID in another column

I have two columns in my DB table, where the first one is auto incremented ID. In the second one I would like to have that ID mirrored. (I know it sound like design error, but I really need it) Is it possible to configure it that way? ...
more »

2017-11-08 13:11 (3) Answers

MySQL Select - join tables that match all

I have a database with 3 tables - products, tags, & product_tags. I need a query that will return all of the products that have all of the specified tags. In other words, don't return the product if it does not have all of the specified tags. p...
more »

2017-11-07 02:11 (2) Answers

Saving mutiple integer in mysql database laravel

when I try to save my data into the database, for some reason I can only save 1 integer and not multiple integer inside. Can anyone tell me why? I was thinking it might be because I am using FamilyAge as an integer in the database instead of a string...
more »

2017-11-07 01:11 (1) Answers

Using WHERE clause with LIKE and OR

I have this sql statement for my search function. $a_search = "$a%"; $sql = "SELECT a.*, u.* FROM articles AS a LEFT JOIN users AS u ON a.written_by = u.username WHERE a.written_by OR a.title LIKE ? // want to search ...
more »

2017-11-03 14:11 (2) Answers

mysql search for brackets

To classifie the movies of some friends, i did create a mysql table. we decided to Name the movies as example "dirty.fingers.(2006)". somehow i cant find this title when i search for "title LIKE dirty.fingers.(2006) as the brackets are disturbing. i ...
more »

2017-11-03 14:11 (0) Answers

GROUP CONCAT for Magento Zend Framework

I have 2 tables. First Table is the main table where a column entity_id is used to connect to table 2. But in Table 2, there is a possibility that 1 entity_id has multiple rows. I already have a query which runs in Mysql and is returning the result...
more »

2017-11-03 08:11 (0) Answers

MySQL SELECT where if condition group

Hi this is what I want to do: to_id: 5 to_type: 1 from_id: 3 from_type: 2 I want to SELECT ALL WHERE to_id = 5 only if to_type = 1 AND I want to select * where from_id = 3 only if from_type = 2. how can I do this in a single SELECT statement? ...
more »

2017-11-02 20:11 (1) Answers

Laravel duplicated queries from blade directive

I am getting duplicated queries from using a Blade directive. I am checking a user's role, and then displaying data in a table, so the query repeats itself over and over, slowing down the app. I have registered a Blade service provider, and in the b...
more »

2017-11-01 23:11 (3) Answers

MySQL Using ORDER BY and GROUP BY together

I have a table with products that have id price category etc... I am trying to extract 1 item from each item_category, which is the most recent one (has the highest ID amongst its own category). Here is the code, it gets me 6 items from 6 categories...
more »

2017-10-31 09:10 (1) Answers