Really need help with this!

Discussion in 'PHP' started by bloodwrath, Mar 5, 2006.

  1. #1
    Hi i just got a mysql database
    now im trying to get it to work with php

    this is what ive gotten so far

    <?php
    $dbh=mysql_connect ("localhost", "userid", "password") or die ('I cannot connect to the database because: ' . mysql_error());
    mysql_select_db ("support_xxx");
    mysql_query_db ("support_xxx",$sql = 'SELECT * FROM `viruses_info` WHERE 1 LIMIT 0, 30 '; )
    ?>

    this is the test file
    http://www.supportcave.com/test.php

    any idea's im also prepared to pay someone a reasonable price to get this working,
    Also is their any software that can import mysql and do this automatically as im looking at getting a few of these databases.
     
    bloodwrath, Mar 5, 2006 IP
  2. just-4-teens

    just-4-teens Peon

    Messages:
    3,967
    Likes Received:
    168
    Best Answers:
    0
    Trophy Points:
    0
    #2
    try
    <?php
    $dbh=mysql_connect ("localhost", "userid", "password") or die ('I cannot connect to the database because: ' . mysql_error());
    mysql_select_db ("support_xxx"); 
    mysql_query_db ("support_xxx",$sql = 'SELECT * FROM `viruses_info` WHERE 1 LIMIT 0, 30 ' );
    ?>
    PHP:
     
    just-4-teens, Mar 5, 2006 IP
  3. Dejavu

    Dejavu Peon

    Messages:
    916
    Likes Received:
    53
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Just change your last line to
    $sql = mysql_query("SELECT * FROM 'viruses_info' WHERE 1 LIMIT 0, 30");

    Of course you still need to do something with the data..
     
    Dejavu, Mar 5, 2006 IP
  4. bloodwrath

    bloodwrath Active Member

    Messages:
    1,364
    Likes Received:
    49
    Best Answers:
    0
    Trophy Points:
    90
    #4
    I want to intregrate the data into my website
    how do i do that?

    this is my main site
    http://www.supportcave.com
    that i want to add the database to
     
    bloodwrath, Mar 5, 2006 IP