Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ez_sql_mysqli.php #49

Closed
dialysisreport opened this issue Mar 4, 2014 · 14 comments
Closed

ez_sql_mysqli.php #49

dialysisreport opened this issue Mar 4, 2014 · 14 comments

Comments

@dialysisreport
Copy link

There has to be a bug in the latest ez_sql_mysqli.php file, when I upgrade to the latest version, some queries return No Results, when there should be results, as soon as I replace it with an older version of ez_sql_mysqli.php, the results are returned as expected.

@jtoronto1
Copy link

Same issue here. Older version of mysqli works fine. Latest version returns no results.

@ozh
Copy link
Contributor

ozh commented Mar 4, 2014

Everything seems to work fine with me. This bug report is near to useless: "some queries" and "an older version" cannot be more vague.

@jv2222
Copy link
Contributor

jv2222 commented Mar 4, 2014

jtoronto1 & dialysisreport: Can you give us some examples of things that
are breaking for you? It would be very helpful if you could supply a small
create table with some data and then some queries that are breaking against
that data. Thanks!

On 4 March 2014 08:36, ྅༻ Ǭɀħ ༄༆ཉ notifications@github.com wrote:

Everything seems to work fine with me. This bug report is near to useless:
"some queries" and "an older version" cannot be more vague.


Reply to this email directly or view it on GitHubhttps://github.com//issues/49#issuecomment-36644475
.

@dialysisreport
Copy link
Author

@ozh Sorry, but there are no versions on the files themselves, how am I supposed to tell you what version the file is? I agree, I don't give much to go on, but that is all I have for now. And because it works "fine for you" doesn't mean there is not a problem. Yes the problem is inconsistent, there is no pattern, some queries work, some simply return No Results, when the same query is run directly on the database, it returns results. @jv2222 I will try to gather some data for an example...

@jv2222
Copy link
Contributor

jv2222 commented Mar 4, 2014

Can you post a few of the queries that work, and also a few that don't...

On 4 March 2014 09:11, Dialysis Report notifications@github.com wrote:

Sorry, but there are no versions on the files themselves, how am I
supposed to tell you what version the file is? And yes the problem is
inconsistent, there is no pattern, some queries work, some simply return No
Results, when the same query is run directly on the database, it returns
results.

Reply to this email directly or view it on GitHubhttps://github.com//issues/49#issuecomment-36648601
.

@dialysisreport
Copy link
Author

Here is an example using 2 different ez_sql_mysqli.php files (older / latest) they are running the exact same query - one works, one doesn't. If you want the database file, let me know. Maybe I'm doing something wrong, but I've used this awesome software for years. (Love it!)
http://dialysisreport.org/_test/test_older.php
http://dialysisreport.org/_test/test_latest.php

Here what is running

use_disk_cache = false; $db->cache_queries = false; $db_data = $db->get_results("SELECT permalink FROM tbltest;"); $db->debug(); foreach ( $db_data as $data ) { $permalink = $data->permalink; echo "http://dialysisreport.org/$permalink/".PHP_EOL; }

@jtoronto1
Copy link

My code looks like:
$value = $db->get_var("SELECT testValue FROM test_Settings WHERE testName = 'TEST_VERSION' LIMIT 1");

Using the original "ez_sql_mysqli.php" file it works:
ezSQL (v2.17) Debug..
Query [1] -- [SELECT testValue FROM test_Settings WHERE testName = 'TEST_VERSION' LIMIT 1]
Query Result..
(row) 252 2
testValue
1 45

Using the current "ez_sql_mysqli.php" file it does not work:
ezSQL (v2.17) Debug..
Query [1] -- [SELECT testValue FROM test_Settings WHERE testName = 'TEST_VERSION' LIMIT 1]
Query Result..
No Results

Note: the ez_sql_mysqli.php does not have a version number so that v2.17 is coming from the core.

@dialysisreport
Copy link
Author

When I take out the code update from
df8d8e5
The query works as expected.

@jv2222
Copy link
Contributor

jv2222 commented Mar 4, 2014

Good work! So it seems like it relates to...

what happens if you change this...

if ( ! isset($this->dbh) || ! $this->dbh->connect_errno )
return false;

to this...

if ( ! isset($this->dbh) || ! $this->dbh )
return false;

line 254

On 4 March 2014 10:30, Dialysis Report notifications@github.com wrote:

When I take out the code update from
df8d8e5df8d8e5
The query works as expected.

Reply to this email directly or view it on GitHubhttps://github.com//issues/49#issuecomment-36657172
.

@jv2222
Copy link
Contributor

jv2222 commented Mar 4, 2014

Ok I made a change in the code can you try the latest version. Thanks!

@dialysisreport
Copy link
Author

@jv2222 that worked for me. Thanks!

line: 254
if ( ! isset($this->dbh) || ! $this->dbh )
return false;

@jv2222
Copy link
Contributor

jv2222 commented Mar 4, 2014

Ok you shoulfd be able to use the latest version from github thanks for
your help!

On 4 March 2014 10:43, Dialysis Report notifications@github.com wrote:

@jv2222 https://github.com/jv2222 that worked for me.

line: 254

if ( ! isset($this->dbh) || ! $this->dbh )
return false;

Reply to this email directly or view it on GitHubhttps://github.com//issues/49#issuecomment-36658608
.

@jv2222 jv2222 closed this as completed Mar 4, 2014
@dialysisreport
Copy link
Author

The ezSQL code had made my life much easier, thanks to you and all the contributors! Thanks for all your work.

@jtoronto1
Copy link

Thanks for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants