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

Medoo::RAW with joined table under Version 2.x.x #995

Open
rotkaepchen opened this issue Aug 11, 2021 · 2 comments
Open

Medoo::RAW with joined table under Version 2.x.x #995

rotkaepchen opened this issue Aug 11, 2021 · 2 comments

Comments

@rotkaepchen
Copy link

Hi all,

I have an issue to join tables and use Medoo::RAW as where.
Database: Postgresql

Example:
$join=array('[>]AdminSegmentTypes'=>['segment_types_id'=>'id']);
$where="WHERE network.networkv4 <<= INET'$net' OR network.networkv6 <<= INET'$net'";
$result=$database->select($table,$join,$fields,Medoo2::raw($where) );

Error:
Uncaught TypeError: Argument 5 passed to medoo2\Medoo2::selectContext() must be of the type array or null, object given, called in classes/medoo2/Medoo2.class.php on line 1593 and defined in classes/medoo2/Medoo2.class.php:1163 Stack trace: #0 classes/medoo2/Medoo2.class.php(1593): medoo2\Medoo2->selectContext('adminnetworksco...', Array, Array, Array, Object(medoo2\Raw)) #1 content/netmgmt/find_networks.php(88): medoo2\Medoo2->select('network...', Array, Array, Object(medoo2\Raw)) #2 {main} thrown in classes/medoo2/Medoo2.class.php on line 1163

If I use version 1.7.10 with the same command then it works.

regards

@m-nienberg
Copy link

I came here to report this issue, but found this already here, so I'll just add that I have the same problem. Thanks,

@fran-diaz
Copy link

@catfan Seems that deleting "array" at line 1168 fixes the problem.

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

3 participants