Skip to content

Tag: mysql

Inserting data in diferent tables

Im trying to add data to diferent tables in MySQL, but at the moment of run my code, it shows me a error is it “Fatal error: Uncaught Error: Call to a member function query()”, is the firs …

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…

Duplicate checkbox remove in php

I have two tables named bookings and packages. Checked checkboxes are retrieved from bookings table and are working perfectly. But I also need unchecked check boxes from packages table. The problem is checked checkbox values display again. Answer You shouldn’t have two loops. You should only create the …

MySQL, PHP – WHERE clause

I create query as below, but I have a problem with WHERE part: So if I have products i.e.: DB Fiddle APPLE belonging to the categories: FRUIT, GREEN, ROUND WHEEL belonging to the categories: MACHINES, BLACK, ROUND BANANA belonging to the categories: FRUIT, YELLOW, CUBOID PHONE belonging to the categories: ELE…