SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2008
    Location
    Amsterdam, NL, and France
    Posts
    82
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    After CREATE TABLE yet another problem

    What's wrong with this please, it's not doing what I expect it to do. In fact it does nothing.

    Thanks,

    Mike

    <?php
    include("misc.inc");
    $connection = mysql_connect($host,$user,$password)
    or die ("No connection");
    $db = mysql_select_db($database,$connection)
    or die ("No selection");
    $query = "INSERT INTO books(booknumber,title)
    VALUES(01,'sudoku')";
    $result = mysql_query($query, $connection)
    or die ("No query");
    $query = "INSERT INTO books(booknumber,title)
    VALUES(02,'Jobhunters')";
    $result = mysql_query($query, $connection)
    or die ("No query");
    $query = "INSERT INTO books(booknumber,title)
    VALUES(03,'HTML')";
    $result = mysql_query($query, $connection)
    or die ("No query");
    $query = "INSERT INTO books(booknumber,title)
    VALUES(04,'An Irishman')";
    $result = mysql_query($query, $connection)
    or die ("No query");
    ?>
    * * * * My site * * * *
    * * * * My paintings * * * *

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,509
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    Nothing? It doesn't insert the rows, and it doesn't display a message?
    And this is all the code there is?

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2008
    Location
    Amsterdam, NL, and France
    Posts
    82
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It was working after all. I don't know what I missed. Thanks for your time.
    * * * * My site * * * *
    * * * * My paintings * * * *


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •