General ⇒ DVCS Info (Mercurial/CVS) ⇒ New SQL classes ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexDVCS Info (Mercurial/CVS)

New SQL classes Reply to topic

Go to page 1, 2 Next

I've added a new SQL library.
It tries to be compatible with the old system BUT is more strict when it comes to writing SQL queries.
Correct ANSI/ISO syntax is required to make the most cross-db implementation possible.

So, if you find any SQL errors that weren't there, here's your chance to make them ISO SQL-92 compliant.

New features:

Example:
$result = $db->query("SELECT * FROM {$SQL->TBL->admins}");

$result->num_rows;

foreach ($result as $index => $values)
{
    // code here
}

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


// To sync DB:
$db->XML->sync_schema_from_file($file)

// To create a XML export scheme
header('Content-Type: application/xml');
$db->XML->export_schema(fopen('php://output', 'w'));
exit;

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.6 / PHP 5.6 / DCVS


A tip to existing CVS users - do not update.

CVS is severely broken as a result of this change and is not functional.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Problem currently still relies in 4 methods:
  • list_databases
  • list_tables
  • list_columns
  • list_indexes
Working my ass off to get this incompatibility fixed.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


Install should work again.
Please inform when something is still fails at install (not after!)

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


Let's build the database gives the impression of nothing happening, which might prompt extra clicking of the button.

Unimpeded, it eventually breaks with: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') VALUES ('26','6','2000','Francisco Burzi registers the PHP-Nuke project at Sou' at line 1core.xml history data set obviously hasn't converted properly - several fields have extra column(s) of data.
sql/data/core.xml fix committed (twice)

Fatal error: require() [function.require]: Failed opening required '/install/sql/data/core.php' (include_path='.:/includes:/usr/lib/php:/usr/local/lib/php') in /install/sql/new.php on line 20

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Thanks phoenix!

I've added the missing table data and added a unique index on security table to prevent duplicate entries.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


Just added XML support for PostgreSQL

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


Remove install.php and the install directory right now! Database installed without error, but no forum or PM tables.

Unfortunately, it doesn't proceed to Gather important info & Create super admin account

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


New install now proceeds to completion 👏

Post-install issues here

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Hello,

Just a question about those new SQL functionalities, would it be possible to have the FULL parameter added to the get_column method in order to retreive comments on the table columns.

i know that the request will be much longer to perform upon using the FULL option, so perhaps it can be optionally set on the get_clolumn method.

Hope the question is clear.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/Apache/MySQL 5.1.49/PHP 5.3.6/ DF 9.3.2.0


movix wrote
Just a question about those new SQL functionalities, would it be possible to have the FULL parameter added to the get_column method in order to retreive comments on the table columns.


There is no get_column.
Instead use:
$db->list_columns(table_name);
It will return a multidimensional array as:
array( 'column_name' => array( 'type' => (string), 'notnull' => (boolean), 'default' => (string), 'extra' => (string), 'comment' => (string) ), ...... )

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


Hi DZ Maze,

Thanks for your reply.
Yes is is indeed list_columns.
Correct me, but this method did not returned the comment in 9.x

Movix

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/Apache/MySQL 5.1.49/PHP 5.3.6/ DF 9.3.2.0


movix wrote
Correct me, but this method did not returned the comment in 9.x

Correct, it didn't.
Now it does as it is supported by our XML DB schema.xsd.
Due to that we can add comments to tables and columns in xml db schemas like core.xml

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


what about perfomance when using the FULL option in the query to retrieve comments and extra ?
Is it worth to make this optional upon calling the method ?
For my part i noticed that the query tooks about 10 times longer when using the FULL option in the query.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/Apache/MySQL 5.1.49/PHP 5.3.6/ DF 9.3.2.0

All times are UTC
Go to page 1, 2 Next


Jump to: