Skip to content

Tag: mysql

How to post query parameters with Axios?

I am trying to post on an API with some query params. This is working on PostMan / Insomnia when I am trying to by passing mail and firstname as query parameters : However, when I am trying to do it with my react native app, I got a 400 error (Invalid Query Parameters). This is the post method :

How do I return data as a Key & Value pair from MySQL

I’m trying to return a JSON object with a Key,Value pair, both of which are seperate columns in my MySQL table. So the MySQL table Looks (simplified 1000%) like this: And I want a JSON object like I could build it up as a string in MySQL by looping through the table and concat everything together, then …

Inserting value in a JavaScript variable from php code

I am trying to test the following code for inserting the value from PHP code to my javascript variable x tested the PHP code, and it’s giving the correct output but the alert box in the javascript shows this – date_sub(curdate(),interval 1 day) and activity=1 group by code having b > 1000&#8243…