Skip to content

Tag: php

MySQL Update with 2 conditions

In my table I have some rows with same ‘stock_id’, and need update with 2 conditions, but don’t work, just update all rows with value 1 $this->db->query(‘UPDATE stock_table SET size = IF(kit = …

How to parse json array from mysql?

I have this data but I can’t parse it in the way I want. this is what I get: { “navigations”: { “title”: “Facebook”, “link”: “https://facebook.com”, “behavior”: “EXTERNAL” } } And …

Extract form field from webhook request

I am getting the following output by this statement $varname = file_get_contents(‘php://input’); Output – You’ve got a new submission8793892-1=AM+BH&8793892-2=TT&8793893=aman.h340gmail.com&…

Dynamic value in sql query using php

I want to search a certain string in all the columns of different tables, so I am looping the query through every column name. but if i give it as dynamic value it does not seem to work. what is wrong?…