User Profile

Collapse

Profile Sidebar

Collapse
akis
akis
Last Activity: Feb 17 '11, 08:35 PM
Joined: Feb 17 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • akis
    replied to Could someone translate this to mysql commands?
    Code:
    <?php 
    	
    $dbhost = 'localhost';
    $dbuser = 'root';
    $dbpass = '';
    
    $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
    
    $dbname = 'ccdb';
    mysql_select_db($dbname);
    $sql="SELECT * FROM transactions"; 
    
    $result = mysql_query($sql) or die(mysql_error());
    
    if (!$conn)
    { 
    exit("Error in SQL");
    ...
    See more | Go to post
    Last edited by akis; Feb 17 '11, 08:20 PM. Reason: explanation

    Leave a comment:


  • akis
    started a topic Could someone translate this to mysql commands?

    Could someone translate this to mysql commands?

    Hello all
    I have a php code that connects with odbc in mdb database and I want to change that and connect to an mysql database
    the original code is :
    Code:
    <?php 
    
    # connect to a DSN "mydb"
    $connect = odbc_connect("mydb", "", "");
    
    # queries 
    $sql="SELECT * FROM Transactions"; 
    
    #perform the querries
    $rs=odbc_exec($connect,
    ...
    See more | Go to post
No activity results to display
Show More
Working...