|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-12-29 17:42 UTC] jani@php.net
-Status: Open
+Status: Closed
-Package: Feature/Change Request
+Package: *General Issues
-Assigned To:
+Assigned To: jani
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Jan 20 08:00:01 2026 UTC |
Hello, this request is related to #15101. Sample: function a($like){ $id, $name array; $val = "select ID, NAME from PEOPLE where NAME like\"{$like}\" into $id, $name"; $x = getContext(); sql_fetch_array($val, $x); show_result($id, $name); } function sql_fetch_array($query, $context){ ...there we separate into part of query, run i.e.mysql_fetch_array into $result, for each resulting row we run something like this: eval("$id[".$index."] = ".$result[ID], $context); } The thing logic is, that we can change variables ouside its regular scope. In this example we do it by previously saved "context". I propose this type of solution, because I have it already in my previous development tool. Maybe exist any more possibilities, how to do that. This is useful to write many of general functions for (in my case) high quality SQL support. If any other question about this, write me. Best regards, Tomas Polak