All,
Does anyone know if there is a package available to allow PHP programmers to store their PHP Objects / Instances into mySQL, and still allow them to be searchable? ie .. not serialized?
Looking forward to your responses,
E,
All,
Does anyone know if there is a package available to allow PHP programmers to store their PHP Objects / Instances into mySQL, and still allow them to be searchable? ie .. not serialized?
Looking forward to your responses,
E,
Instead of storing alot of code into a database and making extremely confusing code, couldn't you just make a file named "functions&objects.inc.php"? And then include this into your php-script:
<?php
//
// Filename: functions&objects.inc.php
//
function sayHi() {
echo "Hi!";
}
var x = new Array();
?>
<?php
//
// Filename: myfile.php
//
include("functions&objects.inc.php");
sayHi();
var x[0] = "This is a value";
?>
Graphix,
Actually what I'm looking for would look more like ...
PHP Syntax
1. <?
2. $Address = new Address();
3. $Address->setName (...);
4. // ... more set functions here
5. mySQL->Store($Address);
6. ?>
All,
Does anyone know if there is a package available to allow PHP programmers to store their PHP Objects / Instances into mySQL, and still allow them to be searchable? ie .. not serialized?
Looking forward to your responses,
E,
I don't think so. You have to use serialize to store something like an object in mysql.
Usually if you want something like that you'll have an ORM handle it for you transparently. Take a look at Doctrine (http://www.doctrine-project.org/)
Usually if you want something like that you'll have an ORM handle it for you transparently. Take a look at Doctrine (http://www.doctrine-project.org/)
Or use that.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.