Skip to content

Updating postgres with if conditions on parameters

I am trying to do a postgres update using if conditions to check if a parameter is empty before attempting to update. The desired result would be not to update when the parameter is an ampty string. I cannot seem to figure out the correct way to do this. My first attempt is below: and then my second attempt w…

Php info differs from server and info.php

I don´t know why but when i type on the server php -v i shows: PHP 7.4.5 (cli) (built: Apr 23 2020 00:10:21) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies …

how do I get nested pojo result from php mysql

How to get nested pojo result like this one, This is I got from somewhere I forgot, but it has no code for make this result. with my code like this the result of mine like this Yeah I know it’s somekind old question, with many of questions similiar to. But I have no clue at all. I appreciate any

Dynamic dropdown Ajax PHP request

I’m trying to make a dynamically populated drop down in a form for location selection. I have scoured stack in other posts that ask similar questions and some websites but my second dropdown is always blank. The first dropdown is populated via a MySQL query. Form section Ajax request ajax_county.php Dat…

PHP mysql Sort JSON data by keys

I want to sort the json data but the sorting shows it wrong. what is the reason of this ? below is the name of my database table I have given pages column name page_content and json data below. Where …