Okay, so this is a topic where I post all my web coding help! I currently need help with MySQL. I have made the database, and things, but I would like to know:
1. How to set something in a table to something.
2. How to add something to a table.
3. How to delete something from a table.
4. How to check if something in a table exists.
Offline
Yes, but I don't understand any SQL, so i'd like somebody to explain to me better, rather than telling me to do it anyway.
Offline
WHY DON'T YOU GOOGLE ANYTHING!!
UPDATE table SET nameOfRow=valueAfter WHERE nameOfCollum=valueBefore;
INSERT INTO table VALUES("string of first row", "string of second row");
DELETE FROM table WHERE nameOfCollum=valueOfRow;And for the last one, a php code would be (after you connect)
NOTE: this is in a function
function getValue($table, $collum, $where){
$result = mysql_query("SELECT * FROM ".$table." WHERE ".$collum."='".$where."'") or die(mysql_error());
return mysql_fetch_array($result);
}With the function, all you have to do is call this function and set it to a variable, then this code will turn the variable into an array, using the collum's name as the array [ ] thingy
Offline