Hi,

I have 2 Identical programs but with different users.

Program lure3 / lure4 are exactly the same but lure4 is with root user
rights the other one with lure user (an other user but with all rigths on
MAPI database.) I cannot figure out what is wrong probably very simple but I
seem to be overlooking it. If I run the program with root user it works
fine. By the way this program give output table information and field
information of a specific database (in my case MAPI).

Program source code !

<?php

// Connecting, selecting database

$Host = "hostIP";

$USER = "lure";

$PASSWORD = "password";

$DB = "MAPI";

$dbh = mysql_connect($HOST,$USER,$PASSWORD);

mysql_select_db($DB);

$tables=mysql_list_tables($DB);

while (list($TheTableName)=mysql_fetch_array($tables))

{

$fields = mysql_list_fields($DB, $TheTableName);

$columns = mysql_num_fields($fields);

echo "<TABLE BORDER=0 width=100% style=\"border-style: outset;

border-color: #C8C8C8; border-width: 1px;\">";

echo "<TR><TH COLSPAN=4 bgcolor=#003399><font

face=\"Verdana, Arial, Helvetica, sans-serif\" size=4
color=#FFFFFF><b>".$TheTableName."</b></font></TH></TR>";

echo "<TR><TH WIDTH=30%

bgcolor=#8CC6FF>ColumnName</TH><TH WIDTH=30%
bgcolor=#8CC6FF>ColumnType</TH>";

echo "<TH WIDTH=20% bgcolor=#8CC6FF>Maximum

Length</TH><TH WIDTH=20%

bgcolor=#8CC6FF>ColumnFlag</TH></TR>";

for ( $i = 0; $i < $columns; $i++ )

{

echo "<TR>";

echo

"<TD

bgcolor=#DFEFFF>".mysql_field_name($fields,$i)."</TD>";

echo

"<TD

bgcolor=#DFEFFF>".mysql_field_type($fields,$i)."</TD>";

echo "<TD bgcolor=#DFEFFF>".

mysql_field_len($fields,$i)."</TD>";

$TheFlag=mysql_field_flags($fields,$i);

if ( empty($TheFlag) )

$TheFlag="null";

echo "<TD

bgcolor=#DFEFFF>".$TheFlag."</TD>";

echo "</TR>";

}

echo "</TABLE>";

}

?>

Error message !

Warning: Unable to save MySQL query result in
c:\websites\www.chrisboer.nl\lure3.php on line 13 (the red text)

Warning: Supplied argument is not a valid MySQL result resource in
c:\websites\www.chrisboer.nl\lure3.php on line 14 (the red text)

Does anyone know a quick answer to this one.

Thanx in advance

Chris Boer

Email... : [EMAIL PROTECTED]

WWW.. : www.point-it.nl




-- 
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]

Reply via email to