Questions tagged [php-mysqlidb]

DO NOT USE FOR MYSQLI QUESTIONS. Use [mysqli] for general questions. PHP-MySQLiDB is a third-party wrapper for MySQLi written in PHP. Use for questions about this specific wrapper library

26 questions
2
votes
2 answers

get already created mysqliDb connection from another class

I have MysqliDb https://github.com/joshcam/PHP-MySQLi-Database-Class. In my php class: db = new MysqliDb ('localhost', 'root',…
tuncayeco
  • 39
  • 7
1
vote
1 answer

Call-time pass-by-reference has been deprecated, array_push error

I'm using a MysqliDb class and it gives this error: "Deprecated: Call-time pass-by-reference has been deprecated in C:...\MySqlDb.php on line 101", 340, 348 and 375 where is a array_push function: array_push($params,…
Silviu Claponea
  • 145
  • 1
  • 1
  • 5
1
vote
1 answer

How to Make SQL Query that excludes rows without all parameters

I have a search box that I give the user to put in key words they want to search for. On submit, I split the words in the input box (if multiple) into an array and perform a query for each individual word. With SQL I can get results that have at…
dan178
  • 335
  • 2
  • 16
1
vote
1 answer

How can I use an auto-incremented MySQL key in a new html form?

I have two html forms to register products in an RMA. The first form is really basic and I can easily store the data to the db. The problem comes when I use $newrmaid = $conn->insert_id;(where $conn is a mysqli-object) to get the auto-incremented ID…
Anders
  • 11
  • 1
1
vote
1 answer

Best practice for global variables in an object -

I have a question on best practices for PHP OOP, relating the using global variables in methods. I know what I am doing is incorrect, but I am not certain how else it should be done. We are using this database class:…
Bobby Bruce
  • 341
  • 5
  • 12
1
vote
3 answers

SQL Query rawQuery with PHP-MySQLi-Database-Class

I'm using PHP-MySQLi-Database-Class (MysqliDb.php). I have got that query, but Wamp says: Fatal error: Problem preparing query SELECT car_id FROM gm_cars WHERE car_id NOT IN ( SELECT reserve_car_id FROM gm_reservations WHERE reserve_dropOff…
1
vote
2 answers

Allowed memory size

I'm using PHP MySQLi Database Class and on my local computer everything works without any problem. However, when I upload my project to my host I get the following error: Fatal error: Allowed memory size of 52428800 bytes exhausted (tried to…
Abduhafiz
  • 3,318
  • 5
  • 38
  • 48
1
vote
2 answers

Query does not work with Mysqli php class but works in MySQL workbench

I am using the mysqli db class found at github my query looks like $db->query(' SELECT memberID,zoneCode,state,zone,countyName, CONCAT(state,\'Z\',zone) as fullZoneCode FROM members_zonesToWatch LEFT JOIN ( SELECT…
bretterer
  • 5,693
  • 5
  • 32
  • 53
0
votes
0 answers

Can't call to relation property in php-MysqliDb

The product object has the relation to category object. protected $relations = [ 'category' => ['hasOne', '\Module\Shop\Model\Category', 'cat_id'], ]; https://github.com/ThingEngineer/PHP-MySQLi-Database-Class#objects-mapping However if i…
TomSawyer
  • 3,711
  • 6
  • 44
  • 79
0
votes
3 answers

What's wrong with my code to get last insert id?

This is my code to insert date to database. Everything is fine except I cannot get insert_id. if ($_SERVER['REQUEST_METHOD'] == 'POST') { $data_to_store = filter_input_array(INPUT_POST); $db = getDbInstance(); $Stats = $db->insert…
Joe
  • 13
  • 5
0
votes
2 answers

Why is mysqli query not completed or cut when using ajax / php response

I am using an ajax script to send parameters and get a response to ajax.php. This is working fine as I can send parameters and get a response. My problem is that when I echo the query in the ajax.php script, I check on my browsers network. I see…
user7498826
  • 173
  • 3
  • 9
0
votes
1 answer

php constructor does not seems to work

I have this class: class template { private $_db; public function __construct(){ $this->_db = \MysqliDb::getInstance(); } public function get(){ return $this->_db->rawQuery("SHOW COLUMNS FROM rank LIKE…
thingNumber2
  • 123
  • 1
  • 8
0
votes
2 answers

WHERE OR query with WHERE AND with PHP-MySQLi-Database-Class

I am using MysqlDb Class in my Project. $fromquery = $jdb->where("ac_ag_Id",1)->orWhere("ac_ag_Id",2)->orWhere("ac_ag_Id",4)->orWhere("ac_ag_Id",17)->where("c_Id",$cc_Id)->get("tbl_accounts") This is my current query and the result is SELECT *…
Priyamanu
  • 183
  • 1
  • 3
  • 11
0
votes
2 answers

MysqliDb - check if the connection is closed

Im using this class https://github.com/joshcam/PHP-MySQLi-Database-Class (MysqliDb.php) which works fine however i cant determine if the connection to mysql closes automatically or if i need to close the connection somehow at the end of my file(s)…
user520300
  • 1,497
  • 5
  • 24
  • 46
0
votes
1 answer

How to Display total mysql queries executed specific mysqli class

I am using this php class. here it is https://github.com/joshcam/PHP-MySQLi-Database-Class Could someone tell me how I can get the number of queries that have been run during a trace session. The trace documentation is at the end of the…
Fatih Toprak
  • 1,097
  • 1
  • 19
  • 48
1
2