My current output of my PHP script looks like this: [ { “id”: “1087”, “name”: “Abhishek Saini”, “email”: “info@gmail.com&…
Tag: mysql
PHP: looking up values in DB and converting before inserting data
This might be easier to do with javascript but but I happen to be restricted solely to MySQL, PHP, and Apache (as well as HTML and CSS obviously) for this project, and I’m not good at PHP I’ve basically finished the whole thing but came a cross a small problem. The user creates a sport event and t…
Using multi where queries Laravel relationships
I have two tables (Table1, Table2). I want to print the sum of the records whose properties match Table1 in Table2 while listing the Table1 table. My two tables contain very large records, performance is important to me. I’m adding the sample database pictures: Thank you. Answer First, add below use sta…
Database update through checkbox change
For my thesis, I am working on a program for checking cars. Currently, I am working on the user management now I have encountered the problem that the database needs to be updated when a checkbox is changed status. Image checkboxes: Now I have already started looking a bit on how to execute a PHP function whe…
How to JOIN MySQL tables with specific ID of each table with PHP
I don’t know how to join tables and fetch informations from each of them. I have clients, who has made reservations and when I click on specific client I need not only information about him from clients table, but also need information related to him by id from reservations table. This is my ER diagram …
Problem with multiple image upload in laravel 8
I have to make an online shop website and I have to make multiple image uploads inside my product’s form and then display it as a slideshow in my view. I tried 5 tutorials or their concepts and nothing works. I’m so frustrated, so if you guys know anything, hit me up. I’m hoping to find simp…
Why does PDO::fetchAll() on an UPDATE prepared statement cause “unbuffered queries are active” exception?
PHP Version: PHP 7.4.13 I have run into this issue where a fetchAll() is being called on a prepared statement, with an UPDATE query: While researching for causes for the MySQL error 2014 Cannot execute queries while other unbuffered queries are active exception, it seems that this case is not covered on other…
how to upload image on flutter to MySQL
I am a newbie in a flutter. Can someone show me how to upload an image to my MySQL? I can’t find any solution in the past weeks. My Code: import ‘dart:io’; import ‘package:flutter/cupertino.dart’; …
Comparing value submitted by user to database, redirecting based on results
I am trying to build a webpage, that allows users to enter a code (numbers and letters only). Based on if the code is a “winner”, it will redirect them to a “winner” page on my …
Trying to get a list of unique events from wp_posts with data from wp_postmeta
I’ve spent about 4 hours trying to figure out why I cannot do a group by of the post_title and left join the date data from the wp_postmeta table The code without the group by clause, results all my events but I only want to retrieve the first instance of the event, by grouping by the post_title, which …