Re: Couple of small questions

From: Date: Mon, 20 Nov 2000 18:18:04 +0000
Subject: Re: Couple of small questions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-26301@lists.php.net to get a copy of this message
Usually, you need tell mysql_Connect() where to connect to and as who. ;-) -jeremy brand Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: jeremy@nirvani.net http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more - - - - - - - - - - - - - - - - - - - - - - - - - I am pleased to see that we have differences. May we together become greater than the sum of both of us. -- Surak of Vulcan, "The Savage Curtain", stardate 5906.4 On Mon, 20 Nov 2000 Website4S@aol.com wrote: > Date: Mon, 20 Nov 2000 06:11:52 EST > From: Website4S@aol.com > To: jeremy@nirvani.net > Cc: php-general@lists.php.net > Subject: Re: [PHP] Couple of small questions > > In a message dated 20/11/2000 10:24:44 GMT Standard Time, jeremy@nirvani.net > writes: > > << select sum(Gram) from tablename; > > :) > -jeremy brand >> > > Ok I am doing this but something still isn`t working, this is the code I have > anyone spot a mistake? > > $SQLStatement = "SELECT SUM(Gram) FROM Purdue"; > > $SQLConn = mysql_connect("", "", "") or die ("Could > not connect to > database"); > > $db = mysql_select_db("", $SQLConn) or die ("Couldn`t select > database"); > > $KL = mysql_query($SQLStatement) or die ("Invalid Query"); > > > mysql_close ($SQLConn); > echo ($KL); >

« previous php.general (#26301) next »