Rlib is a report writing engine that takes report specifications in an XML language. It emits reports in several formats including HTML and PDF.
I stumbled across RLIB while figuring out how to implement some MS Access report writing features in PHP. MSA users will know what writing a report is, but PHP coders probably don't, so I'll explain.
I was having a real WTF moment with Access. I'd coded up an SQL query in access, and a string had a single quote in it, fouling up the query.
The SQL was something like this:
In the last entry, log lines were being "compressed" by placing them into a database table. There were a few bugs in that code that have been fixed, and features added to the new script, below, that save us from losing some log data. Explanation after the code:
This is the start of a macro that will scan your Outlook Inbox or a subfolder named "Bounces" for bounce messages, and record such messages to an Access database.
Jawahar on Expertsforge says this is an SQL syntax error where a
Example of how to add a row to a db table, in ADO:
http://msdn.microsoft.com/en-us/library/ms677536(VS.85).aspx
In the symfony book
there's an alarming bit of explanation:
Here's a snippet of javascript that breaks up a phone number into its parts, if it's formatted in the common formats.
var cell = namesArray[rownum]['Cell']; This is an almost complete CakePHP component to create hierarchical reports.
It's not really canonical Cake, because it only works with MySQL.
This is a way to insert empty or empty-like rows into a list of "seats" that contains not only reservations, but a number saying how many seats a group of people have.
The goal is to remove all the bad fax numbers from a JBlast fax list. This applies to any situation where you want to remove one list of data from another list of data. Another way to say it is that you have a full list, and you're trying to remove a sublist from the full list.
The way you do it is by taking the full list, and then doing a JOIN that will add a column that identifies the rows that are present in the sublist. You can do this with a LEFT JOIN. A LEFT JOIN includes all the rows in the left table, in this case, the full list. It matches on a key in the right table, and when there's a match, columns from the right table are included; when there's no match, the columns are set to NULL.
The following image shows a left join in Access.
Here's a noob-to-noob optimization trick. Suppose you have a database table with, say, 200,000 records, and you regularly select on multiple criteria. The rule for selection is to put the most specific WHERE clause first, and the least specific last. The goal is to cut down the search set to something small, and then search through the smaller set. Get all the queries using this order, then create a composite index over the keys to speed up the search even more.
Here are some before and after shots, based on real queries (from sf-active):
select * from tb where display='t' and parent_id=0 and id > 198000 limit 0,30
After:
select * from tb where id > 198000 and parent_id=0 and display='t' limit 0,30