Professional Hypertext Preprocessor, a widely used platform for dynamic web applications.

learn more… | top users | synonyms

-3
votes
1answer
11 views

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

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
50 views

Slow search by LIKE and other values (1 million rows+)

I'm currently developing a kind of search website where one can search for business companies in my country. The database table has 1 million rows and quite a few colums (42 columns). But I find it ...
0
votes
0answers
12 views

Database design advice for user access to certain options

I'm creating simple management system where I have 4 types of user access i.e. different permissions. I have created table users where I store each user and each user has user_role column where I ...
0
votes
0answers
5 views

PDO does not fetch any results

I was using PDO queries directly in index.php file.Now I want to create separate file where I will store functions. I created one, but when I call function returns only "0". Old version works: ...
0
votes
1answer
28 views

SUM 2 columns with 2 columns same name [closed]

I have this table id, teama, teamb, pointa, pointb. Columns teama and teamb containing the same names. I want to output the sum grouped by teama from teama where pointa and where teamb pointb. for ...
0
votes
0answers
13 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
49 views

Insert the same time, it is possible to happen?

Good evening. I have a doubt about inclusion in the database. A common example is a user account where the user names must be unique. In the following logic: User enters data into a form. Data are ...
0
votes
2answers
41 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
8 views

Display dynamic table of checkbox in 3 columns in php [migrated]

I have a database table of subjects. I have a web page that displays the list of subjects in 3 columns so that a user can select subjects using a checkbox. The challenge I have is it takes a long time ...
0
votes
0answers
24 views

MySQL user variables vs repeated parameter literals. - performance

I am currently designing a large query which uses a number of parameters numerous times throughout the query and subqueries. After checking out some posts on multiple repeated params, I decided to ...
2
votes
1answer
10 views

Inserting Items Bought by the Customer into the database

I'm having a hard time conceptualizing on how to store the items purchased by the customer into the database while taking note of who was in charge(the cashier in charge of the customer's products) of ...
2
votes
1answer
19 views

Removing the uses of MySQL temporary tables

We have a very huge PHP/MySQL application with a lot of legacy code, this application utilized MySQL for most of it's work. It does most of the processing on the database side using temporary tables, ...
0
votes
0answers
45 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
26 views

Connected to mysql database but cannot print the data

I connected successfully to my database and the I tried to print my data but I can only see the "Connected succesfully" line in the browser. Here is my code: <?php ...
0
votes
1answer
31 views

Php, MySql - Optimisation

I asked this on the general site, but they suggested I come here for ultimate optimisation. It really boils down to which is faster; doing a load of calculations in php with database stuff that is ...
1
vote
0answers
31 views

use IFNULL in laravel

I have a query in laravel which is working fine. $subjects = $app->db->table('subjects')->LeftJoin('downloads', 'subjects.subjectID', '=', 'downloads.subject_id') ...
-1
votes
1answer
15 views

How to sort student result based on subjects

I have this mysql table How can i sort this MYSQL table to this output:
0
votes
1answer
29 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 ...
0
votes
2answers
82 views

mysql too many connections in linux/nginx/php-fpm/php server

One of my mysql client reports "too many connections" of the mysql server. With the processlist of the mysql server, I find many connections come from a client with LNMP(linux nginx mysql php). The ...
0
votes
1answer
35 views

want to import exported xml file in wamp phpmyadmin

I have exported single table from wamp phpmyadmin as xml file for data verification and want to import it again into database as mysql table. Please give me guidance, how its possible?
1
vote
2answers
33 views

How to determine if a column already exists in a MySQL table before altering the table to add it?

I am trying to determine if a column already exists in a MySQL table before altering the table to add it. I need an all in one query I can run since I am executing this through an old PHP mysql ...
1
vote
1answer
47 views

Best way to create searchable and sortable product database

I'm pretty good with coding but I'm a noob at database design. This is a common problem but I didn't see an exact answer so I just want to confirm before I start coding everything. I have a shopping ...
0
votes
1answer
62 views

Combining 2 SELECT queries and printing the results in PostgreSQL

I have 2 queries which I want to use together to produce one output result to the user. The output describes to the user the journey to take to from A to B. I keep getting a syntax error when I try to ...
1
vote
1answer
31 views

lat, long based search with $near shutdown my mongodb on Linux server

Hey guys i am stuck on critical problem & unable to resolve it. I have a project where there is a collection of UK postcodes having 18,00,000 sample postcode records. I have a search query where i ...
3
votes
0answers
76 views

Is this user-storage database system efficient, effective and secure?

I am using: PHP Version 5.2.17-MIT-BACKPORT-GnuTLS SQLite 2.8.17 I have a database called users, which currently has a table called root. There will be others, once I get all the rows for root ...
3
votes
1answer
58 views

PostgreSQL UNIQUE constraint error message

On Appendix A: PostgreSQL error codes, it says: For some types of errors, the server reports the name of a database object (a table, table column, data type, or constraint) associated with the ...
0
votes
2answers
40 views

Mysql show no more than 5 concurrent connection

I'm performing some load tests on my brand new server Apache/PHP/Mysql (Bitnami LAMP stack ). I'm using AWS with 1 EC2 instance behind a loadBalancer. At the moment I'm using loader.io for the tests. ...
0
votes
1answer
24 views

Is this an appropriate forum for help with beginners dba questions? [closed]

I've installed MAMP and Wordpress on a local machine to learn about databases. Can anyone recommend a 'hello world' type tutorial, where I can create my own database within this environment? I ...
1
vote
0answers
41 views

Exactly what are MySQL connections? [closed]

There are tons of questions on how to deal with errors around reaching the maximum number of connections in MySQL. I often program in PHP so answers generally range from changing the max_connections ...
0
votes
1answer
53 views

Error: “mod_fcgid: can't apply process slot for” makes my server unresponsive for a period of time

Following error keeps appearing in my PHP error_log mod_fcgid: can't apply process slot for So far I pinpointed this issue to following settings in httpd.conf FcgidMaxProcessesPerClass 8 ...
0
votes
2answers
54 views

Spanish characters saved incorrect in Mysql

I have googled this already, but I couldn't find what's wrong in my situation. I have a wordpress site that has a lot of non-english users which type in words such as "español" it is printed ...
0
votes
0answers
18 views

Sum data from 3 tables(joining), but one of may no data then other tables data will show

I am making a stock group summary report for this I am making Sum data from 3 joining tables, but one of may no data then other tables data will show. I have 3 tables as: ac_stock_item, ...
0
votes
1answer
63 views

Copy table form MS-SQL server to MySQL, is it possible? [closed]

I have a procedure, say "proc1", inside a MS-SQL server. I would like to create a table (copy of proc1) inside a MySQL server. So far what I do is this: 1-Create a connection to MS-SQL Server 2- run ...
1
vote
0answers
28 views

implement geo / spatial / proximity search with php and mysql — what have you done successfully

For my website's users, I want to implement a worldwide geo / spatial / proximity search with php and mysql. I want to do this as simply and minimally as possible. What is the minimum data I should ...
1
vote
1answer
43 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
104 views

Delete duplicate with same ID PHP/PDO/MYSQL

I'm new to databases and I need your help I'm working on a website and I have few problems. I'm using PDO. There is a user table, with unique ID, name and password. User enters his username and ...
1
vote
2answers
35 views

Fulltext searching on shared hosting - 2000 Entires with around 500 words each

I'm fairly new to db administration and would appreciate some help. I want to host a site which requires full text search on around 2000 items, each with around 500 words each. I need this to be ...
0
votes
1answer
42 views

Fetching data from 3 tables

Wanna fetch data from 3 tables by mysql query to display in feed. But stack. My query is "SELECT f.leaderId, f.followerId, c.ccId, c.ccTitle, c.ccCity, c.ccCountry, c.ccFlag, c.uId, ...
5
votes
1answer
25 views

Execute query cache on startup - Reasonable?

I have a rather database intensive application for a server which is intended to be turned off and on throughout the day. The issue comes at first use of the application after startup; it is slower ...
-1
votes
1answer
112 views

Grouping by each user's statuses or activity datetime

I’ve been trying to figure out in what best way I can implement a stream of activities, that groups a user’s activities that were done on a specific date where the time hh:mm:ss doesn’t differ much ...
3
votes
1answer
50 views

Creating a query to pull very specific information using four tables

I have four tables, with a structure like this: testData This table holds all test data for every user. Each row associates one response for a question, divided up by test. A user can have many ...
2
votes
0answers
67 views

MySQL high performance difference between two similar databases

I'm currently upgrading from TecDoc 2015 Quarter 2 database to TecDoc 2015 Quarter 4 database. Q2 Database: 240,838,107 rows InnoDB utf8_general_ci 23.2 GiB Q4 Database: 265,508,380 rows ...
0
votes
0answers
34 views

Error on connecting to mysqli

I have a virtual server that I'm running MySQL Server on that and Operation System is Windows Server 2012. from my own System I mean home PC , easily I can connect remotely to MySQL Server without ...
1
vote
1answer
25 views

SELECT with equal chance between same IDs - MySQL

How can I SELECT data with equal chances for same IDs in MySQL (for php). For example, assume below data structure: id value 1 alfa 1 beta 1 gamma 2 hello 2 bye 3 sky I want ...
0
votes
0answers
79 views

SET FOREIGN_KEY_CHECKS=1; Commands out of sync; you can't run this command now

I am getting errors that I do not know how to solve using MySQL and php. The error is this... SET FOREIGN_KEY_CHECKS=1; Commands out of sync; you can't run this command now I am trying to run the ...
0
votes
2answers
26 views

Migrating Pure PHP Site with Associated Database To New Server

First, let me say I'm not a DBA or network admin, but have moved large scale CMS websites from host to host. But, I have never moved a pure php coded database driven website from one host to another. ...
1
vote
2answers
35 views

How to subtract an object from another in PHP/MySQL?

I am printing totalbooks with this code: $query ="select sum(copies) as totalbooks from booksdetail"; $result=mysqli_query($con, $query); while($row=mysqli_fetch_array($result)){ echo ...
0
votes
0answers
28 views

Auto Insert new entry's in different database

I have 2 websites with similar MySQL database and both on same server (Linux) When a user register on website A I want to copy the user data to website B database (adb.users to bdb.users). Is there a ...
0
votes
1answer
539 views

Load csv file to mysql using load data local infile

I need a simple way to load a csv file from my computer to the database (which is on a remote server). I'm trying to load the file using a php page that executes this code: $file = ...
0
votes
0answers
9 views

MySQL - Remote Connections - In what format are credentials sent across the internet

Situation I have 3 MySQL servers on 3 machines. Sometimes they have to interact with each other which requires a remote connection from one machine to the other, usually via a PHP PDO connection. ...