GithubHelp home page GithubHelp logo

h1soft / php-pdo-wrapper-class Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 28 KB

Automatically exported from code.google.com/p/php-pdo-wrapper-class

License: GNU General Public License v3.0

PHP 88.67% CSS 11.33%

php-pdo-wrapper-class's Issues

bound LIKE queries not acting correctly

What steps will reproduce the problem?
1. try  bound select  example as listed in examples
2.
3.

What is the expected output? What do you see instead?
should return all records with FName beginning with "J"
return nothing
 if I use "$search%" instead of "%$search" it works
using "%$search%" works properly

as is I would not be able to use Like with words ending in a certain 
param("$search%")

any suggestions


What version of the product are you using? On what operating system?
1.02

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 1 Aug 2012 at 6:17

Missing return on delete function

What steps will reproduce the problem?
1. call   $return = $db->delete("TABLE","field > 1");


What is the expected output? What do you see instead?
Expect $return to be non-null.


What version of the product are you using? On what operating system?
Most recent as of Jan. 2013.

Please provide any additional information below.

The delete function is missing the return keyword when calling $this->run...

Should be:

public function delete($table, $where, $bind="") {
    $sql = "DELETE FROM " . $table . " WHERE " . $where . ";";
    return $this->run($sql, $bind);
}

Original issue reported on code.google.com by [email protected] on 3 Jan 2013 at 3:30

syntax error on first line of demo code

Hmmm - dreamweaver shows syntax error on first line...

here - public function select($table, $where="", $bind="", $fields="*") { }

if I take out the word 'public' the error goes away....

Q: how do I fix this?

<?php

//select Method Declaration
public function select($table, $where="", $bind="", $fields="*") { }

//SELECT #1
$results = $db->select("mytable");

//SELECT #2
$results = $db->select("mytable", "Gender = 'male'");

//SELECT #3 w/Prepared Statement
$search = "J";
$bind = array(
    ":search" => "%$search"
);
$results = $db->select("mytable", "FName LIKE :search", $bind);

?>


Original issue reported on code.google.com by [email protected] on 12 Jun 2013 at 1:42

Wrapper class showing warnings

it shows warning like this 
Warning: Creating default object from empty value in C:\Program Files 
(x86)\Ampps\www\blog\library\class-database.php on line 14

here is that code


        try {
            parent::__construct($dsn, $user, $passwd, $options);
        } catch (PDOException $e) {
            $this->error = $e->getMessage();
        }

it show warrning on this line $this->error=$e->getMessage();

Original issue reported on code.google.com by [email protected] on 2 Jun 2014 at 5:29

Insert mulitple rows?

How would one insert multiple rows? 

I've tried passing $insert as an array -- but no dice. 

Original issue reported on code.google.com by [email protected] on 11 Dec 2014 at 8:09

How to call ErrorCallbackFunction

hi,

It seems the code to get the MYSQL error is in the class, but I am not able to 
figure out how to use it/ call setErrorCallbackFunction.

If you can let me know how to use it, that would be great! 

Thank you

Original issue reported on code.google.com by [email protected] on 12 Apr 2013 at 7:14

Conection Error

how can i echo in my main page if a connection error on the __construct happens?


Original issue reported on code.google.com by [email protected] on 29 Jul 2012 at 9:04

using the $bind

What steps will reproduce the problem?
1. trying to use bind on select
2.
3.

What is the expected output? What do you see instead?
exactly how/what "format" is expected to bind a variable in select?

What version of the product are you using? On what operating system?
1.0.2 

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 16 Aug 2012 at 4:22

insert id

I think it might be more meaningful to return the insert id on insert 
statements.

Original issue reported on code.google.com by [email protected] on 13 Mar 2013 at 1:43

Strict Standards: Creating default object from empty value

What steps will reproduce the problem?
1. Updating php5.3 to php5.4


What is the expected output? What do you see instead?
Expected output would be the script running. What I get as an error as follows:

Strict Standards: Creating default object from empty value in 
/var/www/icp/class.db.php on line 18

What version of the product are you using? On what operating system?
version 1.0.2 and ubuntu linux 12.10



Original issue reported on code.google.com by [email protected] on 12 Dec 2012 at 7:27

How to print SELECT query results?

All questions concern the SELECT queries:

1. How to make a rowcount on a table and echo the number of rows?

2. How to use a while loop to go through some query results and display them?

Thanks
Stefan

Original issue reported on code.google.com by [email protected] on 8 Feb 2013 at 4:11

Implement memcache support

I am not sure this nice wrapper class is still maintained, but, just in case, 
could you implement the optional support of caching via memcached?

Thank you,
a.

Original issue reported on code.google.com by [email protected] on 3 Jan 2014 at 6:16

How to left join?

How to turn the statment below:

SELECT column_name(s)
FROM table1
LEFT JOIN table2
ON table1.column_name=table2.column_name;

to $db->select() in php-pdo-wrapper-class

Original issue reported on code.google.com by [email protected] on 5 Oct 2013 at 5:05

$options in __construct


The __construct function should have room for custom options.

public function __construct($dsn, $user="", $passwd="", $options="") {
  if (!$options) $options = array(
        PDO::ATTR_PERSISTENT => true,
        PDO::ATTR_EMULATE_PREPARES => false,
        PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
    );


Original issue reported on code.google.com by tomtremain on 15 Dec 2014 at 9:35

adding select like this

I love this PDO Wrapper library.  I was wondering how do I do a select 
statement like this

select *, DATEDIFF(expire,NOW()) as DiffDate from mytable




Original issue reported on code.google.com by [email protected] on 2 Jun 2012 at 7:19

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.