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

learn more… | top users | synonyms

1
vote
1answer
83 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
85 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
0answers
74 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
165 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
47 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
238 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
217 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
724 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
283 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
275 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
951 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
16 views

UPDATE & DELETE multiple rows with an array for the id

I wan't to check for challenges a user's team posted that have not been excepted after 1 day, then autorefund the user's team back there credits, and then also delete all the challenges. So far here ...
0
votes
0answers
3 views

Points/Scores display from and to the Database in Android app

I am an absolute beginner to the Android programming and I am trying to develop an Android application using Eclipse where user is able to login/register and is able to see his "white" points based on ...
0
votes
0answers
29 views

Horribly slow MySQL (InnoDB) updates, multiple workers

I've created a PHP daemon that reads records from a MySQL InnoDB-table, analyses it and then updates the record. This process is spread between multiple workers (and servers) using Redis. However, ...
0
votes
0answers
44 views

insert data into mysql from mssql with arabic unicode

I insert data into MSSQL with arabic unicode. I want to insert this field into MYSQL but it insert empty. In MYSQL , I choose utf8-bin , I use php for this action, I declare name , character unicode. ...
0
votes
0answers
25 views

Advice on table structure change

I am in the process of converting an Access application that stores and reports evaluations to being web-based using php and mysql. I have converted the structure and data over from Access and I have ...
0
votes
0answers
26 views

WHERE in CASE in mysql

$sQuery = "SELECT SQL_CALC_FOUND_ROWS ".str_replace(" , ", " ", implode(", ", $aColumns))." FROM (select CASE when r.agent_id=24 THEN r.Unit ELSE '--' END AS MyUnit, CASE when r.agent_id=24 THEN ...
0
votes
0answers
22 views

Improve processing of data and structure design from flat file to CMS DB (using intermediate DB)

I have a flat file (CSV) that brings me the data I want, but it needs to be cleaned and processed before it can be used, so I built an intermediate Database (MySQL) in order to get the structure from ...
0
votes
0answers
12 views

first query on my table takes apx: 0 sec but taking too much time on or after 3 to 4 query

I have the following table in mysql database: CREATE TABLE `chronologicallists` ( `sno` int(250) NOT NULL AUTO_INCREMENT, `empSno` int(11) NOT NULL COMMENT 'Employee Serial Number', ...
0
votes
0answers
60 views

Best way to approach building search functionality using PHP on existing mySQL Database

I am looking for advice on how to approach an upcoming project I am due to undertake. The reason I am asking is that I'm just out of college and the company I work for is currently searching for a new ...
0
votes
0answers
58 views

MySQL check if user has the required privileges before execute CREATE query

I'm working on a get started wizard in my application, and I've come to the part where the user needs to create tables in order to proceed. That can be done in two ways; either copy/paste the provided ...
0
votes
0answers
19 views

Merge colums from two different databases using phpMyAdmin

Is there a way to: Replace all the data from database1 > table1 > column2 With Data from Database2 > table1 > column2 ONLY under the condition that the ID value in database1 > table1 > column1 ...
0
votes
0answers
14 views

different php files on same mongoDB connection in php

I am new to both PHP and mongoDB. I want to know if there is any way to run a PHP project having different files on a single mongoclient(); I have created one connection.php file which is used for ...
0
votes
0answers
51 views

select value between particular date and time schedule

I have database "raj" with table "pagination" In table pagination have "id", "actualtime" and "created" field id - auto_increment actualtime- varchar created- datetime that looks like this CREATE ...
0
votes
0answers
12 views

PHP error log naming by date

Running MySQL 5.5.1 on Server 2008 R2 Currently using the following directive in php.ini error_log = C:\path\${COMPUTERNAME}.log, that works fine. Does anyone know of a similar variable I can use ...
0
votes
0answers
50 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
232 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
27 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
25 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
25 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
50 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
36 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
621 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
25 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
93 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
215 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
129 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
218 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
35 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
64 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
81 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
709 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
142 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
221 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
150 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
327 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
100 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
358 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
231 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
784 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; ...