Menu

MySqueaks / News: Recent posts

1.0.5 out!

Yet more bug fixes... it's really tough to be the sole debugger for over 2600 lines of code I guess... :-|

Posted by Jun Kwang 2007-07-27

DROP bug found!

Please note that there exists a bug within the Drop() function that prevents you from doing DROP operations. To rectify, please bring up the line that resets the object (i.e. the line with a DoReset() in it) to just after the lines of "... return false" statements. If you can't quite catch what I'm saying, just wait for the next release eh?

Posted by Jun Kwang 2007-07-25

1.0.3 released

Version 1.0.3 is released containing the following updates:

1. Added developers documentation.
2. Bug fixes for Values(), Set(), OptimizeTable(), DropTable(), RenameTable() and Tabulate().
3. Updated code for specifying foreign keys (i.e. more bug fixes).
4. Truncate() now supports bindings too (missed this out for 1.0.0).
5. ForeignKey() now supports JoinTo() as well.... read more

Posted by Jun Kwang 2007-07-24

Tutorials to follow soon...

With some sample code. I know it's a little hard to understand the documentation, so I hope to get some samples out quickly, which will include some RSS stuff too. ;)

Posted by Jun Kwang 2007-07-22

It's. Out. One.

This is the most important milestone for MySqueaks as it's status have been officially upgraded from a mere MySQL statement generator to a full-fledged database interface class through bindings. In simpler terms, your MySqueaks objects can represent tables in your databases and you can use the familiar functions to select, update or delete data with flexibility and ease. Read more about it in the documentation - http://mysqueaks.ikueb.com . Meanwhile, I'm off to do some publicity for this... :D So there!

Posted by Jun Kwang 2007-07-20

It's official!

Sorry for the lack of updates for the past couple of weeks...

First things first: 1.0.0 will be released on the 20th July! I'm very excited about this release because... let's keep it a secret first, shall we? :D I'm now tying the loose ends and will get the documentation done over the next two days, so watch out for this space! I assure you 1.0.0 is worth the wait!

Posted by Jun Kwang 2007-07-17

nines and sevens

iPhone, GPLv3 and MySqueaks all released today! :D Although I've only elected to jump by a point increment, I've actually introduced two pretty useful functions - Values() and XML(), pretty self-explanatory - on top of the bug fixes. Enjoy!

P.S.: Watch out for a roadmap in the next couple of days. ;)

Posted by Jun Kwang 2007-06-29

Getting PHP warnings for Submit() ?

If you've turned on error reporting for "minor" PHP warnings and notices, you would realise that although there is no need to specify SQX_NONE for Submit(), the usage of mysql_num_rows($result) will generate a warning message. To solve this non-critical bug, simply change that line in the Submit() method at line 1577/1578* to:

if (substr($this->Query, 0, 3) == "SEL") {... read more

Posted by Jun Kwang 2007-06-21

Handling NULL values, part 2. :(

In my excitement to implement NULL values, I forgot to do the same for INSERT statements... Argh... Looks like it's about time for a bug fix release!

Insert this line before line 308:
if ($curr_set[1] === null) $curr_set[1] = " NULL ";

Posted by Jun Kwang 2007-06-18

Two minor LIMIT bugs...

These bugs will not affect your usage if you pass your limits as a two-element array specifying the upper and lower bound. You're recommended to use that unless you don't really mind making the two changes as specified below:

#1: Line 1035
Change the first inequality < 1 to < 0, i.e.
if (intval($limits) < 1 || intval($limit2) < 1) ...
to:
if (intval($limits) < 0 || intval($limit2) < 1) ...
This will allow you to correct set the lower bound as 0 when you pass a second parameter into Limit().... read more

Posted by Jun Kwang 2007-06-18

zero-ninety-six

Fixed that NULL problem, and as promised in the second previous post, a function to define your own error messages and support for ALTER TABLE ... CHANGE.

Posted by Jun Kwang 2007-06-17

Handling NULL values

This is going to sound silly, but yeah, I totally forgot to cater for NULL values when generating SQL statements... :( Passing PHP's NULL value as parameters wouldn't work now as it simply becomes converted into an empty string. This is definitely one glaring "bug" I'll be fixing for the next release...

Posted by Jun Kwang 2007-06-14

Parts of Threes (0.9.3!)

This is mainly a "maintenance" release, with "lazy-style" function names, a new PKI() function and updated the code for the Submit() function. Obviously comes with the ALTER TABLE... DROP bug fix as well.

Upcoming:
1) ALTER TABLE... CHANGE (missed this when I implemented ALTER TABLE)
2) Customizable error output (via a new error function)
3) Web service option (will look into it)
4) Support for MySQL triggers?
5) XML input/output?

Posted by Jun Kwang 2007-06-12

Critical bug found for ALTER TABLE... DROP!

At line 291, replace Fields with Drop such that the line:

if ($key != count($this->Fields) - 1) $this->Query = $this->Query. ", ";

reads:

if ($key != count($this->Drop) - 1) $this->Query = $this->Query. ", ";

Posted by Jun Kwang 2007-05-06

357-9

The "odd numbers" release! Version 0.9.0 includes support for ALTER TABLE and an updated Limits() function. This was originally supposed to be a "May Day" release but work got the better of me...

Anyway, this release also signifies that I should be able to get back to work on my other project frsb soon... :)

Posted by Jun Kwang 2007-05-03

0.8.5 &quot;234&quot; release

New Tabulate() function. Updated GetQuery() function. Fixed "CONSTRAINT 1 INDEX..." bug. New values added for Join() function.

Next up: Hope to get ALTER TABLE functions done...

Posted by Jun Kwang 2007-04-23

Exams coming up...

Hello! Sorry for the lack of updates... my exams are coming up in two weeks time, so I can only resume my coding on the 13th earliest... wait, that's a Friday? Make that the 14th on Saturday then. :D Meanwhile, I welcome any feedback for future releases! Please download and give it a shot ya? ;)

Posted by Jun Kwang 2007-04-01

Yet another &quot;Constraint... Index&quot; bug...

Specifying INDEX for columns will errorneously [sic] lead to specifying "CONSTRAINT 1 INDEX..." instead. This will be remedied in the next release... if you want to fix the problem now, simple change "true" to "false" in the following line within the function Index() :

$this->Fields[count($this->Fields) - 1]["index"] = true;
(original line above, corrected value should be false!)... read more

Posted by Jun Kwang 2007-03-07

0.8.3 &quot;prime&quot; release

Good old prime "83" released on the 2nd March (prime date!)... A couple of features added including that two bug fixes. :)

Posted by Jun Kwang 2007-03-03

Two more bugs found...

1) If there is no WHERE clause specified for the SELECT statement, there will be a missing whitespace between the tablename(s) and an ORDER BY clause, e.g.:
SELECT * FROM table_nameORDER BY id DESC ;

Solution (Line 143 in PrepareWhere() function): Add a whitespace before the ORDER BY.

2) You can't specify a GROUP BY clause without at least one HAVING condition... Bad design, sorry!

Solution: Add this line of code after the foreach() loop block in PrepareWhere() function:
if ($this->GroupBy && $this->Having = -1) $this->Query = $this->Query." GROUP BY ".$this->GroupBy[0].($this->GroupBy[1] ? " WITH ROLLUP " : "");... read more

Posted by Jun Kwang 2007-02-28

0.8.1 w/bug fix

A bug was discovered with the specifying of keys and indexes. This only affects the second release, i.e. 0.8.0 beta. If you are using that, please update your version to the latest one for the bug fix. If you're still using the initial release, i.e. 0.7.7 beta, please upgrade as well for all the new features introduced since 0.8.0 beta. :)

Posted by Jun Kwang 2007-02-23

Roadmap #1

My profs at my University suggested that maybe I can implement a simple phpMyAdmin-like GUI to aid the beginner programmers. This will be looked into for the next release. Meanwhile, I'll be busy right up till early March, so hopefully I can get that done by then...

Feel free to submit any suggestions you have here to improve MySqueaks! Thanks a lot! :) :)

Posted by Jun Kwang 2007-02-20

About MySqueaks

MySqueaks is the short name for My Simplified Quality Expressions (SQX), a simple PHP class that generates SQL statements. This facilitates an easier understanding of the different parts and conditions of a SQL statement, making it more user-friendly for beginner programmers. The use of the object-orientated (OO) approach allows for a flexible implementation in any form of usage as well.

Work on MySqueaks started as a fork project from my other open-source software, the frsb blogging system. I was thinking of a novel implementation for writing SQL statements in that system, and I thought of encapsulating those "commands" in the form of an easy-to-use class. Coincidentally, I'm taking a database management module in my University, and the course uses a combination of PHP and MySQL for the practical implementation. Hence, I thought that this would also be a good way to not only better my understanding of SQL, but also ease the SQL implementation for beginners as well. ... read more

Posted by Jun Kwang 2007-02-19
MongoDB Logo MongoDB