How would I say
connect to mysql
then create table, and add lists...
and $strlvlelf=1 but in the database? so it has a value
How do I set a value to something in a Database?
Moderator: General Moderators
-
Mythic Fr0st
- Forum Contributor
- Posts: 137
- Joined: Sat Dec 02, 2006 3:23 am
- Contact:
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
-
Mythic Fr0st
- Forum Contributor
- Posts: 137
- Joined: Sat Dec 02, 2006 3:23 am
- Contact:
err
Err sorry, just woke up, forgot this was a php code thingy
(basically im asking how do I set a value to it)
(basically im asking how do I set a value to it)
You ask how to update an entry in the DB?
SQL tutorial in w3school: http://www.w3schools.com/sql/default.asp
Code: Select all
UPDATE `table` SET `column1` = 'value' WHERE `column2` = 'something'- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Re: err
What have you done so far? Try something first then post when your code doesn't work as expected.Mythic Fr0st wrote:Err sorry, just woke up, forgot this was a php code thingy
(basically im asking how do I set a value to it)
-
Mythic Fr0st
- Forum Contributor
- Posts: 137
- Joined: Sat Dec 02, 2006 3:23 am
- Contact:
hmm
Nothing yet, all i know about MySQL is how to add em etc..
I wanna add a value to a certain thing before entering it...
E.G
elf has 4 strength
I wanna create the table 'elf'
and put
strlvlelf=4
into the database (Not update)
I wanna add a value to a certain thing before entering it...
E.G
elf has 4 strength
I wanna create the table 'elf'
and put
strlvlelf=4
into the database (Not update)
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Might a suggest you get a book, read through that, try some stuff then ask for help with what you are trying? In the meantime, look at these functions and see how you can apply those to your app.
mysql_connect()
mysql_select_db()
mysql_query()
mysql_affected_rows()
mysql_fetch_array()
Also look through the MySQL manual at http://www.mysql.com for table structure syntax, field types, data types, SELECT, INSERT, UPDATE and DELETE queries. Learn a bit of this stuff first, then we can help you really learn how to use it.
mysql_connect()
mysql_select_db()
mysql_query()
mysql_affected_rows()
mysql_fetch_array()
Also look through the MySQL manual at http://www.mysql.com for table structure syntax, field types, data types, SELECT, INSERT, UPDATE and DELETE queries. Learn a bit of this stuff first, then we can help you really learn how to use it.