Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 anyone good with php here?
Index -> Graphics and Design, Web Design -> (X)HTML Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Homer_simpson




PostPosted: 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
Sponsor
sponsor
Dan




PostPosted: 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




PostPosted: 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




PostPosted: 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




PostPosted: 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




PostPosted: Thu May 15, 2003 4:44 pm   Post subject: (No subject)

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




PostPosted: Thu May 15, 2003 4:56 pm   Post subject: (No 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.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Homer_simpson




PostPosted: 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
Sponsor
sponsor
Display posts from previous:   
   Index -> Graphics and Design, Web Design -> (X)HTML Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 8 Posts ]
Jump to:   


Style:  
Search: