Hey all,
I ran across a problem while trying to run a delete query. The website that
I am working on has multiple users in the db for various logins and I was
inadvertently using a less-privileged account and found I couldn't make
delete queries run successfully. I eventually found out the
Patrick Price schrieb:
inadvertently using a less-privileged account and found I couldn't make
delete queries run successfully. I eventually found out the problem and
changed the db connection but I was wondering if there is a php function
and/or mysql function that can be run from php to
On Jan 6, 2009, at 7:41 AM, php-db-digest-h...@lists.php.net wrote:
I was wondering if there is a php function
and/or mysql function that can be run from php to find out the
privileges
for a particular db connection. Any ideas?
Just to get you started try:
select * from mysql.user
I'm emailing an html file through phpmailer and the sql look up is getting
the html from a table and setting it into a variable. Within the html from
the table are also variables that are also being called by the same sql that
is looking up the html variable. However the variable in the html are
Hey Frank,
I wasn't able to run the query:
select * from mysql.user where concat(user, '@', host) like (select
CURRENT_USER())
because I didn't have privileges to view the table, but I was able to root
around the INFORMATION_SCHEMA table and find what I needed.
thanks!
patrick
On Tue, Jan 6,
A couple of options:
1. Use eval($databaseString); there are risks as it could be used to
execute arbitrary code should the database be compromised.
2. If your data string is enclosed in single quote php won't evaluate
the variables. Consider changing the outside quotes to double quotes.
If you use preg_replace with the e modifier, you can run eval on the
variables only:
http://us.php.net/preg_replace
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
Phpster wrote:
A couple of options:
1. Use eval($databaseString); there are risks as it