On Wednesday 28 June 2006 19:55, Chris wrote:
> Russbucket wrote:
> > I took an example  of a script from the PHP documentation and try to
> > connect to my database.   If I leave in the or die part of line 3, I get
> > nothing, if I comment out that part I get the echo message on line 4.
> >
> > <?php
> > // Connecting and selecting the database
> > $conn = mysql_connect ('localhost', 'finemanruss', 'XXXXXXXl') or die
> > ('Could not connect :  '  . mysql_error());
> > echo 'Connected successfully';
> > mysql_select_db ("Lions", $conn);
> >
> > // Preform SQL query
> > $query = 'SELECT * FROM Moses_Lake_Lions';
> > $result = mysql_query ($query) or die ( 'Query failed;   '  .
> > mysql_error()); ?>
> >
> > I know line three works without the or die part since I have a 2nd script
> > that is almost the same (no or die) and it retrieves info from my DB.
>
> Try it the same as the php manual page:
>
> $conn = mysql_connect('....');
> if (!$conn) {
>    die("Could not connect: " . mysql_error());
> }
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/
Chris thanks for the response. I got this working and solved a couple other 
issues. Now just have one I'm working on where thedata is not being sorted 
correctly. I will be looking at that tommorrow. 

Thanks again for the response.
-- 
Russ

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to