EZ Results

n/a

n/a

Bug Fix - custom named db object

PROBLEM:
Passing a custom ez_sql object name to constructor doesn't work - for example:
$ezr = new ez_results('custom_dbname');

SOLUTION:
Replace instances of: $db
With: ${$this->ez_sql_object}
On lines 186, 217, and 606 of ez_results.php

I guess I'll try to figure out the CVS system and maybe check in some of these fixes.

EZ Results and its future

Hello JV,

I've tried ezSQL and ezResults now and want to know what do you plan with your products in the nearer future? I've seen that the 'background' between v1.x and your last versions has changed very extremly (more special files and more structured now).

I've also seen now special directoreis in your EZ structure for different databases but I'm really confused that each database have it's own function (names) and (I'm wondering!) it's own function parameters? Why I have to call $ezr->query_mysql with a SQL statement but $ezr->query_oracle with FOUR parameters? I've thought that EZ now offers a database independent 'overlay' and I will be able to set (one times f.e. ez_sql_core.php) which DB I will use (a simple switch I mean), so I'm able to connect to any DB with my once created (same) code.

ezResults gets weird with LIMIT

Hi all,

I hope this hasn't been discussed here already, at least I couldn't find it with the site search function.

My query:

SELECT * FROM anytable LIMIT 10

Causes the following error with ez_results.smarty.php:

Warning: 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 'LIMIT 0,10' at line 1 in c:\php\includes\ezSQL\ez_sql_mysql.php on line 175

After tinkering a while with this problem I noticed that this will not happen when using the plain ez_sql_mysql.php (so $db->get_results($q, ARRAY_A) works nicely) but only when using the mentioned ez_results.smarty.php ($ezr->query($q, ARRAY_A)).

suggested patch for register_function()

---------------------------------------------------------- changes to: ez_results.inc

// $func_args .= "&\$C".($k+1).",";
$arrC[] =& ${'C'.($k+1)};

// eval("$tweak_function(".substr($func_args,0,-1).");");
eval("$tweak_function(&\$arrC);");

---------------------------------------------------------- example of usage:

$fields = array( 1 =>
array('Passes Criteria', 1, 'meets_criteria', 'bool'),
array('Date', 1, 'app_date', 'date')
);

// snip..

$ezr->register_function('format_bool');

function format_bool($args) {
global $fields;

$count = count($args);
if ($count != count($fields)) {return;}

Clickable column headings?

I've been successfully using a modified version of EZResults with Firebird 1.5 SQL database, and its working great. The only problem is that it seems to be missing a key feature and that is the ability to sort a result set by clicking on a column heading.

My problem is that our website has to compete with a lot of ASP.NET sites out there that seem to have datagrids and things like this available out of the box and I have to make EZResults look kick ass to make sure I have happy customers. This is a crucial feature, and before I attempt to delve into the code and do it myself, I saw that some people have posted about this in the forums and I wanted to know if anyone has any code to share or examples, etc. that could help.

Problem : Number of columns displayed

I used following code to fatch results and display


include_once "../shared/ez_sql_core.php";
include_once "ez_sql_mysql.php";
include_once "ez_results.php";

$db = new ezSQL_mysql ('raj','password','my_database','localhost');

$ezr->num_results_per_page = 4;
$ezr->query_mysql("SELECT rbrid,rsbrid,amt,status FROM alog");

$ezr->display();

?>


it displays only first 3 columns even though as many columns it is requested.
if i use $ezr->debug(); then it shows all columns data was fetched. only display() function shows only 3 columns. When I examine the class, I checked display function which echos results prepared by get() which also do not show where it determines to show only 3 columns.

Call-time pass-by-reference

I just started using the $ezr->register_function but am noticing this error in my logs:

[client 169.232.XXX.XXX] PHP Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of change_infraction(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /home/maskeddomain.com/html/ez_results.php(329) : eval()'d code on line 1, referer: http://www.maskeddomain.com/admin/guest_parking.php?uid=1

Fatal error ... any help wuld be appreciated

Fatal error: Call to a member function get_var() on a non-object in C:\wamp\www\alpdatabase\ez_results\ez_results.php on line 622

I searched but though I found a report of this I couldn't find a solution.

Many thanks in advance

richard

ps. ezsql is great.

Syndicate content