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
0 answers

Combine time and timestamp to select timed data in php and mysql

I have two columns in my MySql database activeAt(timestamp) activeAtTime(time) I want to fetch data that are less than activeAtTime(timestamp) and activeAt(time) The problem I'm facing in my code is if activeAt is 25th may & activeAtTime is 5pm of…
Sudhakar Behera
  • 91
  • 2
  • 10
0
votes
1 answer

Medoo InnerJoin query doesn't work on MSSQL database

I am using MSSQL as my database and Medoo isn't successfully performing select queries with an INNER JOIN. This is my query. $configurations = $this->database->select("application_configurations", [ "[><]environments" => ["active_environment_id",…
0
votes
1 answer

MeDoo - Conditional LIKE in the WHERE part

How can I write the follow sql query in MeDoo??? SELECT * FROM lockers WHERE Active = 1 AND GymID = " . $gimid . " AND ForMale = " . $male . ($filter ? " AND Locker LIKE '%" . $filter . "%'" : "") The problem for me is the…
Silver Lora
  • 107
  • 1
  • 9
0
votes
2 answers

Medoo object inside a php class

I am getting confused on how to use a meddo config class $database = new Medoo([ 'database_type' => 'mysql', 'database_name' => 'name', 'server' => 'localhost', 'username' => 'your_username', 'password' =>…
0
votes
1 answer

How can I pass the mySQL Result in Class to an external function?

I use a framework for MySQL queries. In the framework, I would like to call a separate function for tracking and logging. How can I pass the result array of MySQL Query to this function? /* MySQL class: */ public function query($query, $map = [],…
user12330301
0
votes
1 answer

Medoo | Delete with Inner Join

Hi currently I started to use Medoo, when I checked documentation I couldn't find a way to delete records with inner join statement. Is there any workaround to delete records with inner join using $db->delete() method? Original SQL Query: DELETE t1…
Pelin
  • 467
  • 4
  • 17
0
votes
1 answer

How to write "AND" and "OR" in WHERE clause in a Medoo SQL statement

I'm trying to write a complex SQL select statement in Medoo that involves some AND criteria and some OR criteria. The following is the statement I wrote: debug()->select("ValuesEvaluationInstrument", "*", ["AND"=> ['secondReviewComplete' => "Yes"],…
Momin Zahid
  • 346
  • 1
  • 3
  • 12
0
votes
1 answer

jQuery Datatables increase loading speed

I just included some logging into my application. For testing purpose, I filled the database with some test values (basically the same row over and over again, about 27k rows..). Now I wanted to print the data on a view, doing this:
nameless
  • 1,483
  • 5
  • 32
  • 78
0
votes
1 answer

Medoo and Timezone

I use "Medoo" as a database framework. My problem is I'm in Brazil, but my database (which is MySQL) is in Los Angeles, meaning the timezone is different. I use the NOW() function of the database a lot and everything is like Los Angeles…
0
votes
0 answers

MySQL no record but increase the pointer

I work with Medoo, MySQL Framework, when I try insert a new record, I can't but the pointer in the table increment. If I debug the sentence and execute the sentence in SQL Editor, works fine. MySQL engine is…
0
votes
0 answers

select2 partial load data

I'm using select2 plugin to show my dropdown data . I have problem , because my dropdown select2 have 18000 data . How it is so that the data displayed in part, not all data is loaded. I use the Medoo database framework. how do i do it? This my…
0
votes
1 answer

Is there a way to disable foreign key checks? -Medoo

I am trying to remove some rows in my tables that are constrained by foreign keys. Is there a way to disable foreign key checks to allow the deletion of these items? Possibly through Medoo::raw() ?
Matt Butler
  • 476
  • 6
  • 21
0
votes
1 answer

How to call medoo 1.5 inside a function with ajax?

First question here. I want to call a php function with ajax. Inside the function I have a class from a library that is on a namespace. I've been using medoo with version 0.9 inside functions in php and everything is working great. I also use the…
Labros kar
  • 41
  • 7
0
votes
1 answer

Medoo Syntax for Join Query with Two Foreign Keys

I've a requirement to perform a join operation in SQL with two foreign keys on same table. The answer in below post has the SQL for my requirement. Join On Two Foreign Keys From Same Table In Sql I am trying to convert this query into Medoo syntax,…
Learner
  • 209
  • 2
  • 12
0
votes
0 answers

Pending PDO connection - medoo php

When I change the IP of my MySQL connection and run this: $this->pdo = new PDO($dsn, $this->username, $this->password, $this->option); The try and catch does not work. Its does not catch that error, PDOException or general exception. The problem is…
Scopi
  • 663
  • 1
  • 6
  • 21