[wp-hackers] Feature request: Simplify tables
bhawkeslewis at googlemail.com
Mon May 7 09:51:33 GMT 2007
might also be worth considering.
Computer Guru wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> Chetan Kunte wrote:
>> Hi all -
>> WordPress has a great toolset for creating content (both WYSIWYG and
>> mark-up type). The only thing I see missing is a decent way of
>> creating tables within the content story.
>> Right now, the only way you can create tables is by typing out a
>> painful table markup. I love the way Textpattern (via Textile) allows
>> you to create tables (just by using pipes "|") as separators between
>> table contents.
>> Since WordPress already uses some sort of text conversion to generate
>> compliant markup for many things like endash, emdash, etc, is it
>> possible to include this table thing too? This would mean a lot more
>> to academic types, product/service reviewers, people who love to
>> create simple elegant comparison tables, people writing reports, etc.
>> Apologize in advance, if I am posting it in the wrong place. Thanks,
> This would be the right place, welcome to WP-Hackers :)
> I've never created tables in Textpattern, do you care to elaborate on
> how it would work there?
> I don't see how WP's table-creation stuff is difficult, it's standard
> SQL like most other systems, though I'm not averse to making it easier
> if that's possible....
> ///////////////////SAMPLE CODE/////////////////////////
> $sql = "CREATE TABLE `$table_name` (
> `id` int(11) NOT NULL AUTO_INCREMENT,
> `transaction_id` int(11) NOT NULL,
> `first_name` varchar(255) NOT NULL,
> `last_name` varchar(255) NOT NULL,
> `email` varchar(255) NOT NULL,
> `uri` varchar(255) DEFAULT NULL,
> `amount` double NOT NULL,
> `currency` varchar(255) NOT NULL,
> `dot` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
> PRIMARY KEY (`id`)
> I don't see how you can make that any easier yet retain the control that
> you have here.
> How can I specify the table name and the type without writing all out?
> What about primary keys? Foreign Keys? Null/Not Null?
> Though the code may be unsightly, it's pretty straight-forward with
> regards to writing it... no?
> - --
> Computer Guru
> NeoSmart Technologies
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> -----END PGP SIGNATURE-----
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers