Computer Science Canada

anyone good with php here?

Author:  Homer_simpson [ 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...
???????????????

Author:  Dan [ Thu May 15, 2003 3:40 pm ]
Post 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.

Author:  Homer_simpson [ Thu May 15, 2003 4:19 pm ]
Post subject: 

"insert into dbasename values ('$email', '$name')"; which of my tables does that add the info too?

Author:  Dan [ Thu May 15, 2003 4:21 pm ]
Post subject: 

dbasename

Author:  Homer_simpson [ Thu May 15, 2003 4:29 pm ]
Post 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...?

Author:  Homer_simpson [ Thu May 15, 2003 4:44 pm ]
Post subject: 

i belive i should use where command... am i right?

Author:  Dan [ Thu May 15, 2003 4:56 pm ]
Post subject: 

this site is help full for figeriger this all out:

http://hotwired.lycos.com/webmonkey/programming/php/tutorials/tutorial4.html

it shode have your awnsers there.

Author:  Homer_simpson [ Thu May 15, 2003 5:06 pm ]
Post 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...???


: