Re: [PHP4BETA] Latest CVS - Question
| From: | Joey | Date: | Tue, 21 Sep 1999 14:57:45 +0000 |
| Subject: | Re: [PHP4BETA] Latest CVS - Question | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-4748@lists.php.net to get a copy of this message | ||
sarah,
Are you running CGI or embedded? What OS and web server?
What usually helps is if you can attach gdb to the process,
so we can see what is happening in there...
--Joey Smith
On Tue, 21 Sep 1999, Sarah Pearson wrote:
> Dustin Marquess [jailbird@alcatraz.fdf.net] wrote:
> > >
> > > However, if I put $db as the link identifer in mysql_select_db I get the
> > > document contains no data error. I do not know if this is an error or
> > > intentional.
> >
> > Probably because you are assigning $db the result of the
> > mysql_connect, which is a MySQL data structure. mysql_select_db() wants
> > the name of the database you want to select, not the structure. Try:
> >
> > $blah = "pcstuff";
> > @mysql_select_db($blah) or die("Could not select database.");
>
>
> I hear what you are saying and it works, just like my code snippet does. However,
> if you include the link identifer in the mysql_select_db statement it gives the
> document comtains no data error message. Not very useful when I have 2 or more databases
> open at once.
>
> The following code taken directly from the Core Programming Book (with my echo statement) has
> the same problem : (I created a temp database called store).
>
>
> <?
> $mysql_link = mysql_connect("localhost", "root", "");
> mysql_select_db("store",$mysql_link);
> echo "Boo!";
> ?>
>
> Even putting :
> $blah = "store";
> mysql_select_db($blah, $mysql_link);
>
> gives the error.
>
> Having the link identifer in the select_db statement worked fine until a CVS download
> yesterday. If the format of the command has changed then fine, but to me it looks
> like a possible problem.
>
> --
> Sarah Pearson
> sarah@zippysoft.com
>
> --
> PHP 4 Beta
>
>