I think you can get this error when you sql query fails. Try copy and pasting the $sql query to the mysql command line and see what response you get (it looks as though this would work though unless you haven't got a table called "test"). I guess it might be that you are not successfully logging on (although I can't recall whether that would then generate this error when you try and issue a query or not). You should set up a "die" error path as well to help you see if you fail to log in.
-torrent "Jon" <[EMAIL PROTECTED]> wrote in message Usenet.ipsiitnr@localhost">news:Usenet.ipsiitnr@localhost... > please review my script > > I have already had it said that the script is fine, please check. IF > it is then I have a set up proiblem which I would also like help to > solve. BUT mysql outside of apache works fine. > > I started with an already set up apache so I don't know if mysql was > installed in right, but the staements before the error seem to work so > I would think so. > > I running my web server under red hat 7.0, I am new to apache/php and > mysql. > > Thanks > > ---------------------------- > > I get an error when it hits the line > > while ($row = mysql_fetch_row($rs)) {} > > I know it won't do anything, just checking each command. > > For a moment I thought this means that the mysql wan't compiled in but - > then how comes the other mysql_ statements don't error. > > anyway the error I get is this > Supplied argument is not a valid MySQL result resource ....... > > Now I am a C++ programmer so I am estimating here, it sounds like $row - > is wrong, do I need to set this up as an array (I believe that is what - > it is supposed to be) > > The $rs is right I am pretty sure and the command should do what I want- > it to do. > > > > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]