Skip to content
Advertisement

Tag: sql

Post date format and select date format from the database

I have a textbox that displays the current date in format: d-m-Y When I save this the date will written to my database like: Y-m-d. For example: the current date is: 02-06-2016. My script writes this to the database as: 2002-06-16. I am using the following code to save the data to my database: What do I need to change

PHP MySql delete query

I have a delete script on my dashboard that WAS working before moving domains. ( not sure if that is relevant ) The code for my ‘deletejob.php’ is below. <?php error_reporting(0); $host = '…

How to prevent fraud in credit system?

Supposing our accounts table has a column called balance, each transaction is logged in the transactions table. Of course, we should verify there is sufficient funds prior to doing any transactions to sell products. Therefore, for performance purposes we should check the balance column of the user, deduct the amount on a successful sale, and update his balance. However, if

Advertisement