Hi,
can I assume that the password is always the third field of mysql.user?
Marc
On Thu, 8 Aug 2002, Marc Delisle wrote:
can I assume that the password is always the third field of mysql.user?
I don't think so.
Why not just specify the fields you want, in the order you want in your query?
Robin Johnson wrote:
On Thu, 8 Aug 2002, Marc Delisle wrote:
can I assume that the password is always the third field of mysql.user?
I don't think so.
Why not just specify the fields you want, in the order you want in your query?
Because the goal is to find if the name of the password field in mysql.user is Password or password, and I wanted to avoid doing a loop for each of the fields, looking for "assword".
I am implementing the fix in user_details as is, maybe someone will come with a better solution.
Marc
At 08:12 09.08.2002 -0400, you wrote:
Robin Johnson wrote:
On Thu, 8 Aug 2002, Marc Delisle wrote:
can I assume that the password is always the third field of mysql.user?
I don't think so.
Why not just specify the fields you want, in the order you want in your query?
Because the goal is to find if the name of the password field in mysql.user is Password or password, and I wanted to avoid doing a loop for each of the fields, looking for "assword".
I am implementing the fix in user_details as is, maybe someone will come with a better solution.
hmm dont know why it would be different (Password or password) but how about a simple solution *G*
show fields from mysql.user like "%assword"
Marc
This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
Good idea, thanks :)
"Thomas Bähr [Office]" a écrit :
At 08:12 09.08.2002 -0400, you wrote:
Robin Johnson wrote:
On Thu, 8 Aug 2002, Marc Delisle wrote:
can I assume that the password is always the third field of mysql.user?
I don't think so.
Why not just specify the fields you want, in the order you want in your query?
Because the goal is to find if the name of the password field in mysql.user is Password or password, and I wanted to avoid doing a loop for each of the fields, looking for "assword".
I am implementing the fix in user_details as is, maybe someone will come with a better solution.
hmm dont know why it would be different (Password or password) but how about a simple solution *G*
show fields from mysql.user like "%assword"
Marc
This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
----- Original Message ----- From: "Thomas Bähr [Office]" baehr@glaswald.de
hmm dont know why it would be different (Password or password) but how about a simple solution *G*
show fields from mysql.user like "%assword"
Just forget my previous mail, this solution is the better one ;-)
Alexander
----- Original Message ----- From: "Marc Delisle" DelislMa@CollegeSherbrooke.qc.ca
Robin Johnson wrote:
On Thu, 8 Aug 2002, Marc Delisle wrote:
can I assume that the password is always the third field of mysql.user?
I don't think so.
Why not just specify the fields you want, in the order you want in your query?
Because the goal is to find if the name of the password field in
mysql.user
is Password or password, and I wanted to avoid doing a loop for each of
the
fields, looking for "assword".
What about this:
$res = PMA_mysql_query($sql_query, $dbh); $row = mysql_fetch_array($res, MYSQL_ASSOC); if (isset($row['Password'])) { $pw_key = 'Password'; } else if (isset($row['password'])) { $pw_key = 'password'; } else { $pw_key = FALSE; }
$pw_key should now contain the correct column name for the password field or FALSE is there is neither a "Password" nor a "password" field. Regards,
Alexander