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

learn more… | top users | synonyms

-3
votes
0answers
14 views

date wise convert row to column with sum of amount in mysql

i want dynamic table for dynamic date wise with sum of amount....plz help me guys.. Thanks in advance
1
vote
0answers
15 views

log_bin_trust_function_creators deterministic always throws an error on server restart [duplicate]

Everytime my rackspace server restarts because of some maintenance or an outage, all of my mysql functions stop working due to this deterministic error. To fix this, I have to manually pull up the ...
3
votes
0answers
94 views

Inputting auto-incrementing, grouped, unique hashes?

Alright, here's what I've come up with so far: SET @id=(SELECT IFNULL(MAX(id) + 1, 0) FROM leads); UPDATE leads SET id=@id WHERE id IN ( SELECT id FROM (SELECT * FROM leads) AS something WHERE ...
0
votes
0answers
24 views

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

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|...
-1
votes
1answer
34 views

Server Specifications for Web Application [closed]

I am trying to select the configuration for a web application built in PHP 5.5 and MySQL 5.1. I will also be deploying PHPmyAdmin for the MySQL database. Both the web application and the database will ...
0
votes
1answer
18 views

Do dormant databases impact server performance?

On our web server, my team has been creating new databases in MySQL to manage backups. They simply create new database_DATE and copy over our live site. Which made me think today... Can having a ...
1
vote
2answers
135 views

Efficient workflow/queries to save unique information?

I am saving company information in a database. There is a single table with an auto-incrementing key that is unique to each company. There are separate tables for emails, websites, phone numbers, and ...
0
votes
0answers
16 views

php mysql insert time

I am getting time values from another application in this sample format "2016-12-25 13:43:15" but when they get to my database they change to "0000-00-00 00:00:00" for the date am using DATETIME mysql ...
1
vote
0answers
26 views

How to compare three columns on WHERE condition? [closed]

I need to compare three columns in a single table. Please help me clarify this problem. $pro_qry1 = "SELECT * FROM orders WHERE customer_id ='$id' AND item_id='$pro_id' AND status='0'"; $pro_run1 = ...
2
votes
1answer
105 views

Strange Garbage Character in SQL server database like ÂÃÂÃÂÃÂÃÂÃÂÃÂÃ [closed]

I am using HTMLBOX editor for getting Notes/RichText Data input from User. I found there are lot of garbage characters in my database and they keep on doubling on each time user save/update notes. ...
0
votes
0answers
17 views

find unique value from a list & sum & count their existing required value

1) I have a table named "plan_info_upload" which is like: site_id site_name 2G_bw 3G_bw route_path 1 MBCGP1 11 30 MBLMA1>MBSMGR 2 BOPBG2 12 22 ...
0
votes
1answer
35 views

Mysql/pivot table for two tables

I was trying to get multiple rows into single row with dynamic columns created as per the data.i have two tables combined with foreign key.here is my data follows table 1: | id | name | Invoice value ...
-5
votes
1answer
55 views

Could someone explain how PHP, MySQL, SQL work together? [closed]

I feel so confused on what they are and how they work. From what I've read PHP is a server-side language. Therefore, it's a language basically designed to talk with the web server to get it to do ...
0
votes
1answer
47 views

Searching a text with space in mySql match against Query

I want to search a text in mysql DB with [space] (Ascii 32) as a part of it. But I am not getting the correct result. My MySql Query is: SELECT count(id) as total , MIN(product_price) as ...
0
votes
0answers
33 views

Updating rows in multiple different tables using JOIN

Following is my MySQL SELECT query and it works. SELECT candidates.CandidateName, candidates.CandidateVotes, candidates.Party, candidates.win, candidates.NameOrder, ...
0
votes
0answers
27 views

Two -way replication on the same server

I have an ubuntu server, and I have a mysql with two database. I want to sync these two database (Two way replication) either via php or command line. I have searched a lot, but I cant find something. ...
0
votes
2answers
43 views

Encrypting a Database row-by-row

I have a large database (millions of rows in hundreds of tables) that contains sensitive data (Think SSNs, account numbers, etc). I am tasked with safeguarding the data and have chosen to encrypt only ...
2
votes
1answer
53 views

Prevent duplicate entries

I have log in form with Username and Password. $con=mysqli_connect(LOGINDETAILS); /*if (!$con) { die("Can not connect: " . mysql_error()); } */ $Username = $_POST['Username']; $pswd = $_POST['pswd'...
0
votes
1answer
49 views

Database convert character_set_server latin1 to utf8

I am writing about a problem on the character encoding that i have on my site with Magento. In practice, the special characters do not take utf8 and gives me the classic non-coded characters: Ã. ...
-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
63 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
14 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
7 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
32 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
31 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
58 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
53 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
26 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
20 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
28 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
109 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
41 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 $db=@mysqli_connect("host","...
0
votes
1answer
32 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
46 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') ->where('...
-1
votes
1answer
20 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
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 ...
0
votes
2answers
159 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
87 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
40 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
57 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
93 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
45 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
79 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
96 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
54 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
28 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
45 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
67 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
69 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, ...