Skip to content
Advertisement

Tag: php

shopping cart with PHP and connected to the MySQL

Good evening, I am currently working on the implementation of a shopping cart through PHP and MySQL, I am getting the following error at line 172 onwards, I have been looking at the quotes but I cannot find the problem, what could be the solution to this? I have been changing this cart from a mysqli version of it into

can we simplify “while” inside of “while”?

i need some little help ,,, I have a data like this.., (I use php mysql) Initially there was no problem with this, but as time goes by, my data is getting bigger and bigger. finally its made my program slow .. I think maybe because I used “while” inside of “while”. make SQL is called multiple times. is there

SQL – Get multiple values when limit 1

If I have a table like this: And use this query: SELECT ident,COUNT(*) FROM sales WHERE status=? AND team=? AND DATE(date) = DATE(NOW() – INTERVAL 1 DAY) GROUP BY ident order by COUNT(*) DESC LIMIT 1 I get the value: cucu1, since that has the most rows. But if my table is like this: It should return both cucu1 and

How to insert data from one table to another in laravel?

I have two tables, visitors and in. visitors contains columns, Name, Number, Purpose, and Datetime. in contains Name, Number, and InTime. I want to fetch all the values from the visitors table into in. I have tried copying the data from visitors to in, however, if I add new rows into the visitors table, those new rows won’t be reflected

How to retrieve the id stored in a session?

I have a form that allows you to register and log in and a reservation form that allows you to choose a date and time. I would like to be able to retrieve the user id and in my ‘Bookings’ table in the ‘user_id’ field. My Database looks like this : My Database And the form that fills my booking

How to count “Sunday” of the month to count absent employees

I have a problem calculating employee absenteeism in a month. In my query it still counts the day of the ‘sunday’ in this month, which shouldn’t count. This is an sample database used : emp0003 table’s NIK Name 01190301 Susan dvc0004 table’s NIK Enroll 01190301 2021-02-08 07:20:39 01190301 2021-02-06 14:37:08 01190301 2021-02-06 07:57:42 01190301 2021-02-05 17:29:00 01190301 2021-02-05 08:09:54 01190301

Dropdown selection based on other dropdown [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. Improve this question I am working on a webform that will allow the user to simulate a purchase of a movie ticket. The date/time should change dynamically based

Advertisement