Re: Beginner's php/mysql connection probs

From: Date: Fri, 28 Apr 2006 15:28:29 +0000
Subject: Re: Beginner's php/mysql connection probs
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-235016@lists.php.net to get a copy of this message
sathyashrayan schrieb:
Dear group, (I am a very beginner so please bear with me for a simple question)
I read that sentence somewhere before *mmh*
I am a self thought php beginner. I wrote my first toy code for database connection in php/mysql. The connection is successful but iam getting a warning and my rows/columns are not showing. I am getting a warning: Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in c:\webs\test\dbs\one.php on line 13 I went through the php manual for the above mentioned function where I get no clue. Pls guide me. code: <html> <head>
     <title> my first data base page </title>
</head> <body> <pre> <?php
    $conn = mysqli_connect("localhost","root","passwd","temp")
            or die("conn failed");
    $temp1 = "select *from grape_varity";     $result = mysqli_query($conn,$temp);
This is right:
$result = mysqli_query($temp1,$conn);
[OT] And one more thing is if I want to replay to a msg in this mail list do I have to hit replay button or replay-all button for posting in the mail list. I use "microsoft outlook 2000" Reply all is ok.
Barry -- Smileys rule (cX.x)C --o(^_^o) Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

« previous php.general (#235016) next »