echo " Step 1. Insert data
"; $sql = "INSERT INTO users (name,city,web,age) VALUES ('Tom','Vegas','www.tom.com',5)"; if ($result){ echo "Data was inserted! "; } else { echo "An error occured during insert! "; } .", City:".$row['city'].", Age:".$row['age']." "; } echo " Step 2. Update data
"; $sql = "UPDATE users SET age=45 WHERE name='Tom'"; if ($result){ echo "Data was updated! "; } else { echo "An error occured during update! "; } .", City:".$row['city'].", Age:".$row['age']." "; } echo " Step 3. Remove data
"; $sql = "DELETE FROM users WHERE name='Tom'"; if ($result){ echo "Data was removed! "; } else { echo "An error occured during remove! "; } .", City:".$row['city'].", Age:".$row['age']." "; } ?>
This blog aim is to provide support to all It and Telecom related professional in the form of books,article,howtos etc.
Sunday, January 30, 2011
MySQL PHP Exampler
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment