How to create a column of mysql using another column (answered)

Advertisements id name updated_at desc_id 1 Bananas 2021-12-06 09:58:59 2 2 Melons 2022-01-10 10:08:57 1 3 Pies 2019-11-07 11:20:48 3 I need to create the column desc_id that takes informations from updated_at and gives back ids in descending order from the oldes to the newest. I have so little information of mysql that i don’t… Read More How to create a column of mysql using another column (answered)

Split a comma delimited string into an array and display on html page

Advertisements basically I’m making a page where the information from mySQL database will be displayed. I have a column named topics in the database where the string (VARCHAR) goes like this: Marketing, Business, Law, Medicine, … I’m trying to break up this string after a comma and display them in a single line one by… Read More Split a comma delimited string into an array and display on html page

mysqli prepared statement throwing uncaught error

Advertisements I am attempting to prepare my sql statement however I am getting an error thrown that I cannot discern. Uncaught Error: Call to a member function fetch_assoc() on bool I have this error reporting on at the top of my file: ini_set(‘display_errors’, ‘1’); ini_set(‘display_startup_errors’, ‘1’); error_reporting(E_ALL); mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); Section that fails: $alreadyHasJob =… Read More mysqli prepared statement throwing uncaught error

I have a problem when I want to insert a sql text in my phpmyadmin

Advertisements Sorry if my English is bad: I’m French ^^ I want insert that but I can’t because I have an error CREATE TABLE IF NOT EXISTS `moneysafes` ( `id` int(11) NOT NULL AUTO_INCREMENT, `safe` varchar(50) NOT NULL DEFAULT ‘0’, `money` int(11) NOT NULL DEFAULT 0, `transactions` text NOT NULL DEFAULT ‘0’, PRIMARY KEY (`id`)… Read More I have a problem when I want to insert a sql text in my phpmyadmin