Skip to content

Tag: mysql

Store timestamp and their price values

I have the following mysql table “auctions”. The “quantity available”, “price” and the “current timestamp” will be updated every hour from an extern API. I want to store these datas for a price/ quantity archive. For that I need to archivate the older datas (qua…

convert some value from mysql query using php

using php I make a query to mysql. Inside my query, some values are in seconds (just some of them), I’d like to convert them into mm:ss. So I need to move into my “array” query and I do not understand how to move inside my query result, attribute after attribute. Here is my db : In my php co…

Laravel Query Sending Different Result For Same Problem

Hi I am trying to create a one on one messaging system on LARAVEL. It was working all fine until for some users it started showing different result then expected. And it happens only for some users.. What is wrong with this query After I return $messages the result is like this… Working Result: Messages…

Getting most popular tags [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 1 year ago. Improve this question Writing a query that returns like the table below. What I am trying to do i…

get users that did not buy a product

I have three tables users table products table users_buy table I want to get users who did not buy a specific product for example, user number 20 bought 5 product with ids [1,2,3,4,5] and user number 19 bought 3 product with ids [1,2,3] And user number 18 bought 2 product with ids [1,3] I want to get users wh…

Taking Array Post Data and INSERTING to sql

I am trying to get an Array of $_POST data and inserting it into mysql with 3 insert statements .. to make 3 new rows in a table. Form: The Variable in the name field is the Workshop ID number. The final mysql statement will be something like the following where $workshopid would come from the numbers inside …