Jump to content

Jewel

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Jewel's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thank you for that, It works fine now! I thought that I'd tried that earlier, but obviously I did something not quite right. Thanks again.
  2. I have a short and simple script which is supposed to query my database for film titles and display them.  At the moment it will only display the first title.  I have checked and double checked but I can't see anything wrong with the code, can anyone tell me what I'm doing wrong please? The database only has the one field (title) and contains 11 titles at the moment.  The code is as follows: <? //set up table and database names $db_name = "dynamic"; $table_name = "Kubrick"; //connect to server and select database $connection = @mysql_connect("localhost","jimmy","12345") or die(mysql_error()); $db = @mysql_select_db($db_name,$connection) or die(mysql_error()); //build and issue query $sql ="SELECT * FROM $table_name ORDER by title"; //store the result of the query $result = @mysql_query($sql,$connection)or die(mysql_error()); //get results for display while ($row = mysql_fetch_array($result)) { $title = $row['title']; } ?> Kubrick [ <? echo "($title) {< KubrickMovie \"$title\" >}"; ?> ]
×
×
  • 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.