Skip to content

Tag: mysql

Referencing the count in object PHP

I’m trying to reference COUNT(*) from the object below. I grab the date using $the_date = $obj2->the_date as per the below example, but how do I reference count? Of course using COUNT(*) will throw …

SQL Query not return values

Im running a bit of SQL on my php app, its meant to return a value that gets compared to the value that does get returned. The query is returning two of the 4 values that i need. I’ve tried to …

How to compare two sets

I need to get all aid’s values which have cid != 40 and cid= 39 (many-to-many connection) I’ve prepared two queries but i don’t know how to except second from first SELECT DISTINCT aid FROM …

How can i count project status by change/update made

I want to count status change by id from to I have a mysql status table which has a name with pre implementation, implementation and operations states. a project contains project id, name, start date fields. both status and projects have a many to many relationship called project_status table contains project_id, status_id, date_of_progress. so i want to count all projects

How to search JSON data associative array mysql 5.5

I have stored JSON associative array data in the column of the table in MySQL 5.5. I want to search in JSON at one specific array key with key and value my JSON structure : So for search by Key Value, I have this query : It is working fine but my problem is that I can not select Interface_1