Jump to content

Newbie


davidspeare

Recommended Posts

Hello all,

 

I'm trying to run some script to populate a table that is already created.  When I run the below code I am getting the completed message at the end, but my data is not going into my table....is there something incorrect with this code that is causing the issue?

 

//make sure that we are using the right database

mysql_select_db("test");

 

//insert data into "movietypeds table"

$type = "INSERT INTO movietypeds (movietype_id, movietype_label) " .

"VALUES (1, 'Sci Fi'), " .

"(2, 'Drama'), " .

"(3, 'Adventure'), " .

"(4, 'War'), " .

"(5, 'Comedy'), " .

"(6, 'Horror'), " .

"(7, 'Action'), " .

"(8, 'Kids'), " .

$results = mysql_query($type)

  or die(mysql_error());

 

echo "Completed";

 

?>

 

Thanks

 

Link to comment
https://forums.phpfreaks.com/topic/42391-newbie/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.