anyone good with php here?
Author |
Message |
Homer_simpson
|
Posted: Thu May 15, 2003 1:01 am Post subject: anyone good with php here? |
|
|
does anyone know how i can add or update data to mysql using php...
does anyone know how to use mysql_query function...
??????????????? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Dan
|
Posted: Thu May 15, 2003 3:40 pm Post subject: (No subject) |
|
|
code: |
$connection = mysql_connect ("host", "username", "pass");
$query = "insert into dbasename values ('$email', '$name')";
$result = mysql_db_query ("compsci_ca", $query);
mysql_close();
|
thats a simple ex on how to add stuff to a dbase where there are 2 string values. |
Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |
|
|
|
|
Homer_simpson
|
Posted: Thu May 15, 2003 4:19 pm Post subject: (No subject) |
|
|
"insert into dbasename values ('$email', '$name')"; which of my tables does that add the info too? |
|
|
|
|
|
Dan
|
Posted: Thu May 15, 2003 4:21 pm Post subject: (No subject) |
|
|
dbasename |
Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |
|
|
|
|
Homer_simpson
|
Posted: Thu May 15, 2003 4:29 pm Post subject: (No subject) |
|
|
aaaaaaaahhh... ic so u should have actually changed that to tablename... =Þ.
But here's another thing...what if i have some data already inserted in my table and i want to start adding data after the 10th line... then what do i do...? |
|
|
|
|
|
Homer_simpson
|
Posted: Thu May 15, 2003 4:44 pm Post subject: (No subject) |
|
|
i belive i should use where command... am i right? |
|
|
|
|
|
Dan
|
|
|
|
|
Homer_simpson
|
Posted: Thu May 15, 2003 5:06 pm Post subject: (No subject) |
|
|
yes it was a pretty good tutorial but i couldn't find one thing that i wanted in it... how do u erase a table...??? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
|
|