PDA

View Full Version : MySQL querys With eval()???


Neo
08-07-2002, 06:22 AM
Is there at any way possiable to store mysql queries in a database like

$var1_db=$DB_site->query("SELECT * FROM blah");

and have it work coming through eval() ???

thanks

- Lord Neo :glasses:

Admin
08-07-2002, 10:57 AM
Umm, yeah...

$dbquery = '$var1_db = $DB_site->query("SELECT * FROM blah");';
eval($dbquery);
Just make sure only what you want goes through eval() and not user submitted data.

Neo
08-07-2002, 11:17 AM
Thanks. I was never really sure of that / have tryed it.

SpiceGirl
08-08-2002, 11:23 PM
in any case, you should perhaps be trying to avoid eval()s. php coders themselves acknowledge that too many evals can affect performance. there has to be a better way.

Neo
08-09-2002, 04:42 AM
Yeah I am aware of this. If I am going to make that addon that requires this it will only add a few if any.