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

learn more… | top users | synonyms

1
vote
1answer
57 views

Reviewing relational database tables

I am building a database, but I am a little bit confused with my table relationships. I wish someone could help review my table relationships below for me and tell me where I am going wrong. I have ...
1
vote
1answer
52 views

Concurrency Issues when multiple users uses Portal (MySQL and PHP)

We have set up a portal using Yii Framework in Apache, PHP and MySQL. In the portal, there is a feature to export the data in dbf format, the extract takes around 7 minutes, but in those 7 minutes no ...
1
vote
1answer
310 views

Calculating the median value in a MySQL table with CodeIgniter

This is my model file in codeigniter. I need to calculate the median for this variable: budget_breakdown.breakdown_grants. How can I do this calculation? function reports_details1() { ...
0
votes
1answer
44 views

1 million strings and exact match search

I need to chose the best solution (software and algorithm) to solve my problem. I need to store up to million strings and data associated with them. Strings are search queries and data is cached ...
0
votes
1answer
35 views

Quickly etablishing if a remote MySQL connection is valid using PHP

I have a hosted website (Namecheap Pro shared hosting) that connects to a remote MySQL database using a read-only user privilege. This remote DB is updated by a separate system. The website works ...
0
votes
1answer
35 views

Searching through ~1M slow

I've never had a database with this many rows, so I can new to keeping the search time to a minimum. I have a database table with 1.5M rows. The primary key is an auto-increment id. Then there is ...
0
votes
1answer
42 views

Implementing Permissions Database structure on a PHP site to restrict the Access in Multiple levels

I am working on a PHP site that shows the business of a Vehicle Showroom company in which we have 3 users as, Admin(Owner) = Here Admin Have all Access by default(View,Edit,Delete to all) Super ...
0
votes
1answer
89 views

Update table from calculated temporary table

I have two tables, one containing a set of user ID's, vote direction (-1 or 1) and ID of the object they voted on (casted votes table). In the other table, the object id, upvotes, downvotes and ...
1
vote
0answers
51 views

Question on MySQL insert race condition

I'm using MySQL 5.1, PHP 5.3 and the table is MyISAM. Here's the DTD of this very fake table: CREATE TABLE `temp1` ( `value` varchar(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 This ...
1
vote
0answers
111 views

mysql database is corrupt after system power failure

I have mysql database using xampp in my widows system. its got currupt after power failure i have back of database before 2 days but i dont have backup of one day transactions. now i tried ...
1
vote
0answers
42 views

mysql vs mongodb cache/load balancing

I have a system where users can 'like' content. There will likely be many hundreds of these likes going on at once. I'd like it to be AJAX driven so you get an immediate response. At the moment I ...
1
vote
0answers
195 views

What is the best way to manage user access to MySQL via PHP?

I am working on a web application that requires auditing db queries in MySQL. In every application that I have developed or worked on it is standard practice to store the DB credentials in a protected ...
1
vote
0answers
193 views

Need to search users by latitude and longitude

I'm still learning SQL and this is a bit more advanced than my capabilities, so I could use some help. I think I need a sub-query or something. In the database I have a table called user with a ...
1
vote
0answers
576 views

mysql remote connect

Having troubles with this and I'm not sure why.. I'm trying to access a mysql database from another server. I changed the my.cnf file (uncommented the bind-address to access from all): port=3306 ...
1
vote
0answers
211 views

big mysql database optimization

My Joomla mysql database has about 3.4 million rows in content table. It is just static article. Very slow and often use out of resources. To speed up it, I segmented it into 6 sub-tables and added ...
1
vote
0answers
255 views

MySQL GROUP BY and ORDER BY giving inconsistent results

I'm currently working with WordPress, and I've added a new meta value which is a number between 0 and 30. Zero is ignored and up to 30 need to be organised in order and only the latest (based on the ...
1
vote
0answers
864 views

SQL query optimization in Prestashop e-Commerce solution

I'm working on a layered navigation module within Prestashop e-Commerce solution. I'm trying to optimize a SQL query which creates a temp table during execution. I think this is creating a ...
0
votes
0answers
14 views

how to sync local mysql database and live server database?

my plan is to store data in my local mysql database and after a time intervel it will update my live mysql database remotely. Is it possible? i'm planing a inventory management script in php mysql. ...
0
votes
0answers
27 views

Previously inserted rows disappear at call of PHP script

I am developing a server-side portion of a sport manager application using MySQL (5.1.67), with InnoDB as storage engine, and PHP (5.3.3). When I try to execute a script containing any kind of query ...
0
votes
0answers
29 views

Should I separate my preferences table?

I have a hobby site where users can find other hobbyists of similar interest. Each user can set a series of preferences that get saved into user_prefs. Right now there are 4 types of preferences, an ...
0
votes
0answers
75 views

Having trouble configuring phpPgAdmin with PostgreSQL 9.3 on CentOS 6

Trying to hook up phpPgAdmin on my virtual box and having some issues with pg_hba.conf. I added the IP I SSH through, connecting through a VPN, in IPv4 and changed all the methods to md5. I then go to ...
0
votes
0answers
23 views

Multiple client tables or large overall table

I've recently taken over a project linking to a large MySQL DB that was originally designed many years ago and need some help. Currently the DB has 5 tables per client that store their users ...
0
votes
0answers
21 views

Garbage DB Objects Cleansing

How do I find in use db objects from all application pages is there any tool or trick I can use, just like we do search in Visual studio for an object in entire solution
0
votes
0answers
17 views

Checking for records in lookup table before deleting

In my MySQL database, I have products table, a locations table and a lookup table (called location_products) where the ID of the product and ID of the location are stored. I am creating a transaction ...
0
votes
0answers
18 views

Generate report from visitor counter

I have a visitor counter, the table looks like this: id | country_code | datetime | Browser | ... --------------------------------------------------------- 1 | FR | ...
0
votes
0answers
33 views

Low performance oci_execute

I work with a PHP application that connects to an Oracle database. Sometimes, the PHP executes a large query from a large database the page loads for ages (more than 200s). But I've seen something ...
0
votes
0answers
23 views

Upgrading MySql 5.1 to MySql 5.5

I followed a tutorial to update My MySql 5.1 to 5.5 (actually i wanted to upgrade to 5.6, but the tutorial mentioned that i should upgrade to 5.5 first and then to 5.6). However, after removing ...
0
votes
0answers
220 views

how to append or update JSON datatype value in postgreSQL

hey guys i'm using PHP's codeigniter to create my application and postgreSQL as database and i have to update some value in database. So, let's say we have table structure like this:- CREATE TABLE ...
0
votes
0answers
21 views

Intermittent Connection Speeds SQL Server 2008

We are having issues with a PHP-based application connecting to an SQL Server database on a separate server. It uses a single PHP page to establish the connection using mssql_connect, and this page ...
0
votes
0answers
63 views

Connection occasionally fails connecting to MySQL on Amazon RDS from PHP

We're moving MySQL databases from our own EC2 instance, to a multi-zone RDS instance. These are accessed from a load balanced lighttpd + PHP cluster. We've noticed that quite often, in the morning, ...
0
votes
0answers
129 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 ...
0
votes
0answers
116 views

How to use Select query just right after Insert on master in a query.?

I have a question on mysql replication. As usual, I deployed my db structure like the Update on master db, the select on slave. My questions. If I use SELECT query just right after INSERT in a query, ...
0
votes
0answers
146 views

#2002 Cannot log in to the MySQL server / Connection for controluser as defined in your configuration failed

I use PHP/MySQL in Ubuntu 13. To reduce the size of ibdata1, i followed this post What is the best way to reduce the size of ibdata in mysql? and make necessary changes as told in the answer. I did ...
0
votes
0answers
32 views

mysql id sequencial problem

I create 3 records with the id 1,2,3 I delete record 3, then in the future add another record, it then goes 1,2,4. how to id get sequential order when it is deleted the record like 1,2,3
0
votes
0answers
47 views

Filemaker to Firebird data exchange

I want to connect from filemaker to a firebird 2.x DB. Firebird ODBC is not supported, only MYSQL, MS SQL etc. Is there any way to have a translator in between or maybe to connect through a PHP ...
0
votes
0answers
63 views

MySQL + PHP : avoid dirty read

It's possible to avoid dirty read on a MySql database by using a PHP script? i have three two fields (user, incoming_request , outcoming_request) on my table that keep information (as string) about ...
0
votes
0answers
105 views

INSERTS in a loop: Better to use NOW() for each row or PHP date() function once?

Consider a PHP application which inserts about 200-800 records in a loop via prepared queries and parametrized values. The PHP application is on Amazon Web Services, and the database server is in ...
0
votes
0answers
167 views

fulltext search on multiple tables with different fields

I am trying to make a search page return results from multiple table ordered by the keyword. The problem is the select statement gives a result sorted by the select statement and not by the keyword. ...
0
votes
0answers
482 views

Occasional disk I/O errors in SQLite

I have a very simple website running PHP and SQLite 3.7.9 (with PDO). After establishing the SQLite connection I immediately execute the following queries: PRAGMA busy_timeout=0; PRAGMA ...
0
votes
0answers
113 views

Data migration of specific data from one DB to another

I am new to this site, I have one major question of data migration, I apologize before hand if the question is too silly. I have two data base on one server, I have one table with the same schema on ...
0
votes
0answers
148 views

how to update current row value by selecting previous row value in php mysql

How can i update data of current row with selecting data of previous row in php mysql. I have tried following query but it showing me error. update sales_tracking set sales_tracking.opening_units = ( ...
0
votes
0answers
168 views

MySQL stops responding (at almost regular intervals)

Using mysqld (latest xampp version). My.ini port= 3306 socket = "D:/xampp/mysql/mysql.sock" basedir = "D:/xampp/mysql" tmpdir = "D:/xampp/tmp" datadir = "D:/xampp/mysql/data" pid_file = "mysql.pid" ...
0
votes
0answers
433 views

Update row to another table using mysql trigger

I have the following 2 tables (places & offer_company) in a MySQL database named COUPON1.81. CREATE TABLE IF NOT EXISTS `places` ( `id` int(60) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT ...
0
votes
0answers
78 views

Automated query log

I would like to ask for some opinions or recommendations or guidelines on how to create an automatic logging system for the executed querys on a MySQL database. Some details: its a php+mysql ...
0
votes
0answers
135 views

Query should yield result but doesn't

I need to get data from a remote SQL 2000 server and store it in a new MySQL server. I am using the FreeTSD module for php 5.3 to connect to the SQL 2000 server. I can connect without problems. ...
0
votes
0answers
294 views

Mysql 5.6 and install php5-mysql , mysql-common

I install Mysql 5.6 with this documentaion(in ubuntu 13.04) , now I need to install php5-mysql and mysql-common packages. can I install them with apt-get? I think they will install mysql5.5 ...
0
votes
0answers
87 views

Database Schema/Structure advice

Well i am reconstructing an already created application and was looking to improve this, especially with in the database structure. I want to start off with probably the biggest section and that is ...
0
votes
0answers
313 views

MySQL Left Join Select all rows

Hi guys I have a query which is pulling data from database : SELECT sandwich_table.id, `sandwich_name`, salad, COUNT(salad), salad_type.type, ...
0
votes
0answers
200 views

Try to find a match using SUBSTRING(SHA1(value)), 0, 6)

I have a tbl where all entries for companies that participate in a online project are saved. This table is named "business". Those companies can use their employess to access the online platform i 've ...
0
votes
0answers
649 views

Sqlsrv sqlsrv_num_rows FALSE, adding cursor type times out

$sql = "SELECT * FROM lastdeath"; $result = sqlsrv_query( $con, $sql); if( $result === false ) { die( print_r( sqlsrv_errors(), true)); } $row_count = sqlsrv_num_rows($result); echo $row_count; ...