Updating mysql php
Hi all, I am very new to PHP and MYSQL and have a class assignment I need help with.I am trying to make a page with an HTML form that will update my MYSQL database.My SQL UPDATE with subqueries Here in the following, we have discussed how to use My SQL UPDATE command with subqueries.The following My SQL statement will update purch_price with purch_price multiplied by 5 if it satisfies the condition defined in the subquery started with SELECT wrapped within a pair of parenthesis.Where column_name is the name of the column to be updated and new_value is the new value with which the column will be updated.The following My SQL statement will update receive_qty, pub_lang, and receive_dt columns with new values 20, Hindi and 2008-07-10 if purch_price is more than 50.
Now it is important to note that this query would have updated ALL records that had an age of 21 to the new age of 22.
See also My SQL: choosing an API guide and related FAQ for more information.
Alternatives to this function include: Returns the number of affected rows on success, and -1 if the last query failed.
Read More The Date is just a VARCHAR right now in the database.
When I click the submit button, this error comes up: Warning: mysql_query() [function.mysql-query]: Access denied for user 'apache'@'localhost' (using password: NO) in /ebs/home/baileyjumper/domains/baileyjumper.aisites.com/public_html/Scripting-Week7/homework4/on line 81 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /ebs/home/baileyjumper/domains/baileyjumper.aisites.com/public_html/Scripting-Week7/homework4/on line 81 Cannot update Before clicked there are no errors.