toggle menu

Hello i want a solutions for categories off subcategories in array n level .

  • 1 like
  • 1 comment

Sanjana Kumari08 Sep at 12:09

$hostname = "localhost";
$db_username = "root";
$db_password = "";
$db_name = "test";

$db = new mysqli($hostname, $db_username, $db_password, $db_name);

class categoryss {

public function get_categories($id){
global $db;

$querycat = "SELECT cat_id,cat_name,parent_id FROM categories WHERE parent_id='0'";
$querycat = "SELECT cat_id,cat_name,parent_id FROM categories WHERE parent_id='".$id."'";

$result = $db->query($querycat);
if(!empty($row['cat_id']) && $row!=''){


return $gcategories;


$obj=new categoryss();

/*echo "<pre>";
function traverseArray($array) {
foreach($array as $vals) {
echo @$vals['cat_name'] . "<br>";
traverseArray(@$vals['child']). "\n";
echo traverseArray($getNlevelCategory);

Change URL in wordpress mysql database table

Dhananjay Kumar |22 May at 12:05

I need to change URL in my post content , suggest query to quick replace all.

  • 0 like
  • 1 comment

Dhananjay Kumar23 May at 01:05

getting solution and use this below code:
update `wp_posts` set post_content = replace (post_content,'xyzzzzzz','xyz');

Hi, I need help to integrate Paytm payment gateway on web and APP.

Can anyone here share step by step process with sample code to do the same.

I am using PHP as backend langauge.

thanks in advance.


  • 0 like
  • 0 comment

I have uploaded my project Digital Ocean LEMP and getting issue with 

1. Datatype datetime - 0000-00-00 00:00:00 is not valid date type

2. Datatype Integer - Incorrect integer value for column name at row 1

3. Datatype Float - Data truncated for column for column name at row 1

Basically these error were coming at insert and update time, as proper datatype was not coming from php end.

I cannot change php end as project is live.

How to dissolve these issues. thanks in advance

  • 1 like

Dhananjay Kumar03 Apr at 12:04

I am getting the same issues & i have updated MySQL settings and its work fine for me.

You go in a file : /etc/mysql/mysql.conf.d/mysqld.cnf
and add below script at end of line

After adding restart your MySQL: sudo service mysql restart

Please try, its really work.

Manas Mayank03 Apr at 12:04

Thats works for me. Thanks