Referred to as the MySQLi extension or MySQL improved extension. Allows access to additional features provided in MySQL 4.1.3 and newer. It is included with PHP version 5 and later.

learn more… | top users | synonyms

0
votes
0answers
24 views

count rows that has same values from 2 different tables mysql php [on hold]

Let's say that I have 2 tables, one of them is called table1 and the second table is called table2. in each table i have 6 columns that has the same name. Table1: Columns: one|two|three|four|five|...
-3
votes
1answer
14 views

Fetch data from three tables two tables have one same column [closed]

I have three tables a,b,c table a sender status type name1 approved one name1 approved one name1 approved two name2 pending one table b sender p_id name1 ...
0
votes
1answer
23 views

mysqli importer file - disable foreign keys

I am using this script to import a mysql file but I want to set foreign key checks to 0 when he will do the import. https://github.com/davcs86/php-mysqlimporter/blob/master/php-mysqlimporter.php ...
0
votes
0answers
28 views

PHP+MySQL error HY000/2002: buffer memory insufficient or query queue full

I'm developing a small project in PHP(mysqli)+MySQL using only prepared statements. I've got a table related to 4 other tables in 1...n cardinality. I wrote a script with a simple for loop from 1 to ...
0
votes
2answers
51 views

Searching for a keyword across multiple columns

I have a set of names of schools stored in each row in my schools table. the same table has four different category columns which store the names of the subjects they offer. I want to enable ...
0
votes
0answers
108 views

MySQL Too Many Connections (Max Connections Limit Not Reached)

Running a PHP 5.6 application that connects via MySQLi to a MySQL database (5.5) that intermittently errors with the "Too many connections error" however this seems to be a red herring to another ...
0
votes
1answer
58 views

Mysqli error “Empty row Packet body” during reap_async_query

I am executing 50 similar large SELECT queries in parallel with mysqlnd/ mysqli_async in the query-poll-reap fashion. The database holds around 300M records. Recently I migrated the database from ...
0
votes
1answer
32 views

How to find the most common phrases in a MySQL database

I have a table which contains articles on movies. Each article has a title and many of them have common phrases in them. I would like to do some analysis on the data and extract these common phrases ...
1
vote
1answer
333 views

Commands out of sync; you can't run this command now

I have a query which was working fine a few days back: SELECT id, title, details, filetype, filepath, size, details, location, datetime, IF(hid=1, 'Anonymous', ( SELECT ...
0
votes
0answers
37 views

Issue with fetching data from mysql according to recent timestamp ASC ordering

I am having trouble with mysql query to fetch the data according to the recent timestamp in ASC order. it means the recent updated one record will be first shown. The Query is grouping with the ...
6
votes
0answers
108 views

insufficient history for index

In MySql log, there is one error `InnoDB: insufficient history for index 0' I don't know why its occur. I have done google and found following http://dev.mysql.com/doc/relnotes/mysql/5.5/en/news-5-5-...
1
vote
1answer
58 views

Different types of users in one table, How to add data off different users

I have 5 type of users: Super Admin Coordinator Supervisor Student External Examiner All of them have some common attributes like ID, name, email etc. I have inserted them in one table user ...
0
votes
1answer
29 views

MySQLi Tutorials [closed]

I have just finished building my site, and now it's time to finally put a database in it and actually connect it to a database. So far I have downloaded Xampp and installed everything and tested it. ...
1
vote
1answer
65 views

Store Mysql Index in separate .Ibd file?

Is there any option to store table index in separate .ibd file? something like file_per_table mode? Becuase my table is growing more than 200gb. Table .ibd file have index for that table also. so If ...
2
votes
1answer
65 views

Split Mysql Table internally

How to split the huge mysql table (size around 200GB) internally? Is there any mechanism other than partition? The table size is daily growing. Table created using innodb with indices. Thanks in ...
0
votes
0answers
23 views

How to get data from join only if all the services are available

I have created a service table that contains list of all services available with a vendor. For example suppose my vendor is a salon and it provides services like hair cut, massage, waxing, threading ...
0
votes
1answer
119 views

Moving data from one table (a million records in it) data to another table which in remote location? (MySQL)

I want to move data from one table which have more than 2 million records in size into another table which is in a remote machine, and that moving should support Logging Restart Exception handling ...
-1
votes
1answer
80 views

Filter rows on file type [closed]

I want to filter results with file type = .jpg / png from database stored value. here is my code. // Create connection $conn = new mysqli($SERVERmysql, $DB_USER, $DB_PASS, $DB); // Check connection ...
0
votes
1answer
215 views

Select last record from my table [closed]

I am new to SQL and PHP. I'm having a problem with selecting the last record from my table. I run the following query: SELECT * FROM 2521118 ORDER BY id DESC LIMIT 1 My table name is 2521118 and ...
0
votes
1answer
132 views

What is the best way to update a Production database with Test instance changes

I have deployed a Mysql database into Production. As I work on the next release of software I am making changes to a test database. I now need to update our Production system without losing the data ...
1
vote
1answer
152 views

Delete rows where matched value is twice as much

I'm trying to match two tables with two columns, table1 and table2. Each has id and price columns. I want the query to match each id and compare the price, then delete the row if the price in the ...
0
votes
1answer
43 views

How can I connect my other table using the mysqli_insert_id?

I've got a problem like this , I cannot get the id of the parent table . table_name : transaction_tbl - transaction_id -file_name -file_path -description table_name : transaction_details -...
0
votes
1answer
1k views

How to insert multiple values in a specific field in a table using mysqli?

I am working on a project and I I have a scenario like this: I have many field in my table : table_name : transaction_tbl -id -name -description -ref_number : text(datatype) In my inserting here is ...
-2
votes
1answer
5k views

Warning: mysqli_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: NO)

On my local WAMP stack things are working perfectly. When I upload the database on GOdaddy.com, this error shows up. Warning: mysqli_connect(): (HY000/1045): Access denied for user 'root'@'...
0
votes
1answer
104 views

How can I use join in MySQLi?

I am using MySQLi to connect to my database and my problem is that I want to insert in the database but I get this error: Error: Cannot add or update a child row: a foreign key constraint fails ...
0
votes
1answer
567 views

Calculate total attendance for each workshop

I want to get overall attendance in each workshop. NumberOFWeeks column holds the number of weeks the workshop runs. for example Workshop 101 runs for 6 weeks meaning 6 days. So far I have done this ...
0
votes
1answer
125 views

Error: Incorrect usage of UNION and ORDER BY

I have this query: SELECT DISTINCT CONCAT (MONTH(`Date`),'-',YEAR(`Date`)) from wp_result_plugin WHERE Bet=2 AND month(`Date`) = EXTRACT(month FROM (NOW())) ORDER BY MONTH(`Date`) ASC UNION ...
0
votes
1answer
34 views

Returning auto-generated primary key after SQL insertion

I am trying to submit data to a database and then have it return the value of the user_id (primary key) created by the insertion, but I can't get it to return the value. I use the same query in ...
0
votes
0answers
46 views

How to group two query that have already been grouped

I am creating a chat system and i have two queries: The first query selects the Max(id) meaning the last message that has been received or sent by the member that is connected and that has not yet ...
0
votes
1answer
37 views

Update multiple meta_value with single query

Here is a similar structure of a table that I am working on. |--ID--|--user_id--|--meta_key---|--meta_value--| |--1 --|--444444---|--first_name-|------NULL----| |--2 --|--444444---|--last_name--|-----...
1
vote
1answer
1k views

Can't insert arabic text into mysql database using mysql prompt

I had a local table with arabic values.when exported i got the following query. DROP TABLE IF EXISTS `type`; CREATE TABLE IF NOT EXISTS `type` ( `bs_id` int(11) NOT NULL AUTO_INCREMENT, `types` ...
1
vote
1answer
80 views

Receiving duplicate results in one condition of JOINED query

I always end up here when Googling for solutions, so I thought I'd cut out the middleman since I'm unable to fix this via searching/forums. It's my first time posting, so please forgive any faux pas ...
3
votes
2answers
6k views

Get table name from union query?

This is my query SELECT Id, productName, Largeimagepath, Discount, Price, Image FROM tablename1 where Active =1 union SELECT Id, productName, Largeimagepath, Discount, Price, Image FROM tablename2 ...
0
votes
0answers
33 views

Packet and N-SubPacket Msql query ( same as catgeory and N sub catgeory )

First of i am PHP Developer , and working on huge project alone .i think i have made many mistake in creating table. and below is one of those. I am making packet type system when in my Packet Table ,...
0
votes
0answers
744 views

Mysql Insert taking too long. Table need optimzation

I have around 60 tables and a video table with over 600,000 rows. with 4 Btree and 2 FULLText Indexes and have around 30 Columns. Server Specs are high, over 30G of Ram, Intel Xeon Processor. Mysql ...
-1
votes
1answer
62 views

Database update rather than cycle through? [closed]

I'm new when it comes to MySQLi and databases so I'm not sure how exactly to title this question. I have a PHP script setup to where it inserts data into the database. Pretty self explanatory. ...
1
vote
1answer
906 views

Cannot change root access in MySQL to %

This is a new MySQL Server install. I created my root password as part of the setup (on Centos 6.4). When I connect to the server through a terminal, I can connect to MySQL and issue commands, using ...
2
votes
1answer
166 views

Changing Charset to utf8 for all the fields and tables in mysql

How should I use the mysql and awk to change the charset for all the fields and tables for a specific database? I did not include username or password, so for sure it will not work. Should I run it ...
1
vote
1answer
1k views

MySqli - select from db based on time difference with CURTIME() or SUBTIME()

I have a db with some customers data. There I store their last login time as datetime. I want to run a cron php script every min which will query mysqli for their last login datetime and if that was ...
3
votes
2answers
690 views

Should I use select count(*) for counting records or having a field like comments_no for tables like post, comments?

In my recent project which is about social networking for an Asian country, I'm in doubt whether I use the below SQL statement for counting records: SELECT COUNT(id) shareLikeNo FROM ...
1
vote
2answers
448 views

how to get count(*) from table which either has column or not?

I have a post table as below: CREATE TABLE `post` ( `p_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, `user_id` smallint(5) unsigned NOT NULL, `cat_id` tinyint(3) unsigned NOT NULL, `...