note 32877 added to function.stream-wrapper-register
| From: | sab at brandbyge dot dk | Date: | Mon, 09 Jun 2003 22:28:38 +0000 |
| Subject: | note 32877 added to function.stream-wrapper-register | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-50061@lists.php.net to get a copy of this message | ||
This is what I've waited for for a long time!
Did produce a small wrapper to extract php-code from at database. The code is allmost a duplicate of
the var-example above, and it works like a charm.
The semantics are along the lines of:
$resource =
'mysql://<username>:<password>@<mysqlhost>/<database>.<table>?
<fieldname>=<value2match> [optional <sort options>][# <optional
name-of-field2return>]'
include($resource);
And that's it.
An example (in one line:
<?php include('mysql://tester:testpass@localhost/testdb.testtable?
indexfield="abc" order by seqfield#contentfield'); ?>
One problem though: Don't try to use include / require / ... to a selfdefined protocol from
within the Zend development environment (Zend studio), or with debug enabled in your php. It will
blast your apache into orbit.
I'll post a link to the source when I get access to a web-server.
----
Manual Page -- http://www.php.net/manual/en/function.stream-wrapper-register.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32877
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32877&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32877&report=yes