Mysql:

We have installed mysql 3.23.26 beta version to a BSD 4.2 server.  It works 
fine, however when we test a php file which just function to insert some 
data to a table in database, and display all data on the web page.  After 
run this, the data have been inserted and displayed; however, it give us a 
warning message "Warning: MySQL: Unable to save result set in ....." .  I 
test the same scripts in many other servers with MySQl 3.22.23,(BSD) ,  
MYSQL 2.23.36(Linux), there are no errors or any warning messges at all.  Is 
there a way to reconfigration MYSQL, or PHP  to eliminate this problem. The 
following is a typical test .php:

to run this sript, you just create a table call user on your test database.
SQL Scripts to create the table
"
create table user (Uname  varchar(20)
pass    varchar(8));

"


<HTML>
<BODD>
<TITLE> New Document </TITLE>
</HEAD>
<BODY>
<?php
$db = mysql_connect("localhost", "test",  "test1") ;
                mysql_select_db("testdata");



                if($submit)
                {
                        $query = "INSERT INTO user (user, pass) values 
('$user', '$pass') ";

                        $result = mysql_query($query, $db);
                        echo "Your values have been inserted in 
database<BR>";
                }


                $select = "SELECT * FROM user";
                $result1 = mysql_query($select, $db);

                while($r = mysql_fetch_array($result1))
                {
                        $user = $r["user"];
                        $pass = $r["pass"];

                        echo "This is user:             $user<BR>";
                        echo "This is pass:             $pass<BR>";
                }
        ?>
        <form name = frm method = get>
        Username:<input type = text name = user><br>
        Password:<input type = password name = pass>
        <input type = submit name = submit>
        </form>
</BODY>
</HTML>



Thanks,


John


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to