Questions tagged [medoo]

A lightweight PHP framework for dealing with database interaction

Medoo is lightweight single file framework, optimized for higher performance to increase the development and user experience for PHP development projects with SQL database need.

It supports following php_pdo Extensions:

  • MySQL, MariaDB - php_pdo_mysql
  • MSSQL (Windows) - php_pdo_sqlsrv
  • MSSQL (Liunx/UNIX) - php_pdo_dblib
  • Oracle - php_pdo_oci
  • SQLite - php_pdo_sqlite
  • PostgreSQL - php_pdo_pgsql
  • Sybase - php_pdo_dblib

It requires php_pdo_xxx extension to be enabled and recommends PHP 5.4+ with PDO support. However it works with PHP 5.1+

92 questions
0
votes
2 answers

medoo select term doesn't work correct

I have the debug modus on and get this mySQL string: SELECT "dmd_key","id" FROM "keys" WHERE "dmd_key" = '140ec37b981042c8549b07d6d4589295' AND "website" = 'test.de' But that string doesn't work for me. I get a database error message. (the…
cgee
  • 1,910
  • 2
  • 22
  • 38
0
votes
1 answer

Medoo php sql - change search term

i am using the "medoo"-php/mysql-class (http://www.medoo.in) for my latest project. I like the quiet easy way to work with my SQL-stuff. But i wondered if it is possible to change the search term according to an option from an input-select-form.…
Lox
  • 99
  • 1
  • 2
  • 10
0
votes
1 answer

Why "Undefined variable" error?

I am learning PHP by myself. I am using Slim framework with Medoo and creating a login page and when executing login page there is no error. but when calling "call_query" function error occur saying : Undefined variable: database in …
Nishant Bhakta
  • 2,897
  • 3
  • 21
  • 24
0
votes
2 answers

PHP Medoo - num rows

Is it possible to get number of selected rows using Medoo? I havent found anything about it in the documentation. Like num_rows() in mysqli or rowCount in pdo.
devbull
  • 227
  • 1
  • 4
  • 16
0
votes
3 answers

Medoo SQL database select rows matching a date range

Is it possible to include strtotime date comparison parameters when using medoo to SELECT rows from a database? I'm using medoo to make database work nice & simple - it's great. However, I'm not sure if I can (but suspect I can) include a date range…
feelsickened
  • 57
  • 2
  • 10
0
votes
3 answers

Medoo - Updating table row matching multiple field

I am using Medoo. the update below works fine with single field match. I want to update data if match with clientId and businessCity. $database->update("clientInfo", array( "businessName" => $_POST['businessName'], "contactName" =>…
Hardik
  • 1,283
  • 14
  • 34
0
votes
2 answers

Medoo PHP db framework - select join

Using Medoo PHP database framework and trying to make a join $users = $db->select( 'users', [ '[>] tournaments_users' => [ 'tournaments_users.user_id' => 'users.uid' ] ], [ 'users.uid', …
2mas
  • 127
  • 2
  • 14
-1
votes
1 answer

PDO Library Medoo descending order not working

i am using a library for PDO which has basic and easy syntax so everyone with basic MySQL knowledge will understand the code. I've tried running the queries with PDO (without the library i am using) but the issue persists. $tickets =…
user7781246
-1
votes
1 answer

Inner join statement using Medoo

I'm having real problems trying to do an inner join through medoo. Looking at all the resources I can find, there shouldn't be anything wrong with the code below, but it's just coming blank. It's not throwing any errors…
Badger
  • 467
  • 4
  • 17
-1
votes
3 answers

How to get the number of rows in a resultset using medoo

I would like to know how to get the number of rows in a resultset for this statement: $data=$db->query("SELECT name FROM users")->fetchAll(); I need something similar to mysqli_num_rows but using medoo. thanks for your help!
Hechi
  • 281
  • 4
  • 14
-1
votes
2 answers

CSV From Nested array

When Using Medoo advanced select like so: $medoo->query('SQL Goes HERE')->fetchAll(); results are returned in the following structure: Array ( [0] => Array ( [Column 0 name] => "VALUE OF Record 0, Column 0" [0] => "VALUE OF…
TheRealMrCrowley
  • 976
  • 7
  • 24
-1
votes
1 answer

How to get the relations of an item in mysql?

So, here is my database: Item +---------+-------+ | item_id | name | +---------+-------+ | 1 | item1 | | 2 | item2 | | 3 | item3 | | 4 | item4 | +---------+-------+ Type +---------+-------+ | type_id | name …
Quentin Walter
  • 29
  • 1
  • 12
-1
votes
2 answers

Why is $this not the correct type of object?

I'm trying to implement a simple PHP db framework (Medoo) into PHPLib, but am stuck on the following: I have this structure index.php which initiates new medoo object new application object the application class handles general settings for each…
Yorick
  • 1
-2
votes
3 answers

Medoo delete ID found in array

I have scripts provided by another coder that use Medoo for database functions. I have a script to delete one item at a time but now I need to delete multiple rows according to a list submitted from checkboxes. For example: $delete = "123, 124, 125,…
WilliamK
  • 821
  • 1
  • 13
  • 32
-2
votes
3 answers

PHP Error: Cannot use a scalar value as an array... However

I'm currently working with the medoo.php framework, and although I would normally use their ticket area on github, it appears that no one actually uses that... so... At any rate, when I'm running one of my files which uses "require" to call the…
muffinjello
  • 158
  • 1
  • 5
  • 16