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

learn more… | top users | synonyms

1
vote
1answer
5 views

PHP / MYSQL connection failures via socket under moderate load

I've done quite a bit of reading before asking this, so let me preface by saying I am not running out of connections, or memory, or cpu, and from what I can tell, I am not running out of file ...
1
vote
0answers
14 views

Creating a relational database for Twitter

I'm developing a Web app that revolves around the Twitter API. I'm a newbie and this is my first ever attempt at development so be gentle (please). The problem I'm facing is: I have a table that ...
0
votes
1answer
14 views

How to use language PL/PythonU on a PostgreSQL database via phpPgAdmin?

I am used to PgAdmin III where I can simply create python functions like the following on a PostgreSQL database: CREATE OR REPLACE FUNCTION pyHello (x integer) RETURNS void AS $$ if x == 1: ...
-1
votes
0answers
23 views

I have a plan to make a database synchronizer using JOOMLA! and I don't how to start it. Can you help me with this? I am stocked in this part [on hold]

This is the interface I made for my synchronizer. It will first query source databases and their tables and the attributes of the table and then select the target database.
0
votes
1answer
37 views

SQL error: Unknown column in 'where clause' [on hold]

I have following very simple PHP MySQL Query: $sql = 'SELECT * FROM bundesland WHERE bkuerzel = ' . $_GET['q']; $result = mysql_query($sql, $con); When I execute the query with a click on a item ...
-1
votes
1answer
16 views

Query error int/varchar LEFTJOIN [on hold]

Can someone tell me what´s wrong with this query? $sql = "select bans.id as banid, bans.type, bans.data, bans.reason, bans.expire, bans.added_by, bans.added_date, players.id as playerid, ...
0
votes
0answers
24 views

Big difference between id value [duplicate]

I have this database table where I insert multiple results during 1 action. In php I have a submit button when pressed, inserts 1-50 rows(depending on the user input). I've got a foreign key in this ...
0
votes
1answer
5 views

Mysql connect without username/password

I build a new website for a client (WordPress is underlying) and have access trough FTP to his webspace. He does not provide or even know more informations than this because he had taken it from an ...
-2
votes
1answer
25 views

Best way to query for a list and then run a query for each result in that list [closed]

I am new to databases in general and particularly new to PostgreSQL (v 9.3). I often find myself in the situation that I first run a select statement which will return a list of users stored in an ...
0
votes
1answer
34 views

Suitable schema to record email sent and response received and invoicing in DB

When a form submission is made on a website: An email with form's details is sent to a set of recipients email addresses stored in a DB. The email contains a link for the recipient to show interest. ...
0
votes
0answers
24 views
1
vote
1answer
63 views

how to get a sorted result from mysql query?

I am trying to get a sorted result from a MySQL query and i dont have any idea of making the query. I have a example Mysql table as follows : id | cat_type 1 | free 2 | free ...
1
vote
1answer
25 views

Sql Insert into with duplicate key

Ok so, I'm still a beginner in databases. I have this code: $sql=" INSERT INTO complaints_members (password, complaint) VALUES ('$mypassword','$submit') ON DUPLICATE KEY UPDATE ...
0
votes
1answer
58 views

How to change a web application that now needs to become OLTP and OLAP application?

Previously, I did a simple web application for an enterprise client using PHP and MySQL. After some time, it has grown to a point where I realized after talking with people here that I need to treat ...
0
votes
0answers
12 views

Using MongoDB with circular object references

Please forgive me from the beginning. I am brand new to document oriented databases and I am sure that I will need guidance to reform the question in order to get answers. I am looking to use MongoDB ...
-1
votes
0answers
82 views

Install mysql udf sys_exec to call php file on trigger

Can anyone explains complete details of installing sys_exec function to call php file on mysql trigger over the SSH. I tried solution given by various links but not luck. please suggest if anyone has ...
0
votes
1answer
25 views

What should be the structure for a person-to-person store database

I am going to create a person-to-person store with Laravel, a website whose users can share and sell their product or their mobile, TV, Computer, Shoes, Shirts, Books ,Cars, Bags, Animal etc. I am ...
0
votes
1answer
122 views

Transpose MySQL rows as column names - DYNAMIC

My goal is to be able to calculate the time difference between the ticket timestamp being created and closed and if reopened Add time from being reopened to closed again etc.. I have an existing mySQL ...
0
votes
1answer
17 views

Are my MongoDB servers right in setting?

I have a small web site, so I used two servers. A: master 4G Ram, 96G SSD B: slave 2G RAM, 96G SSD The B server is always for backup, no read, no write. In my application, many users can (and will) ...
-1
votes
0answers
53 views

.dbf files, windows 8.1 reading database [closed]

Good day everyone, At the office I have this accounting application that uses .dbf files to store it's internal database and we wanna do a new interface for it to check out what products are in stock ...
0
votes
0answers
83 views

How to insert into MySQL table SUM of two cells from different tables using insert function

I want to make sum of two cells from different tables in MySQL using INSERT function. The code that I used is: $panoue="INSERT INTO usi2(latime_paneli, inaltime_paneli, latime_panele, ...
0
votes
0answers
202 views

Combine and display multiple row data with same column data in MySQL

I have a menu, from where every item ordered is stored in a row. For a single order, there can be multiple rows.What I want is that when I display it, for same order_number ( number) all rows data is ...
0
votes
0answers
15 views

custom product variant design [duplicate]

I'm building a custom eCommerce solution for a client. I came up with this database design: +---------------+ +---------------+ | PRODUCTS |-----< SKUS | +---------------+ ...
0
votes
1answer
59 views

Hardening further mysql with sqlmap suggestion [closed]

I just ran this tool called sqlmap. It gave me this few list as below. sqlmap identified the following injection points with a total of 0 HTTP(s) requests: --- Parameter: ID (GET) Type: ...
1
vote
1answer
41 views

mysql query from 1st domain and insert in 2nd domain

i have data in one of my website and i want to print these data in other site.these two are in same server.at present i have to export mysql data and import into other then do this code to insert in ...
0
votes
4answers
59 views

Pros and cons of a particular DB design approach for single vs multiple tables

I just got a new project (in JAVA) where I am thinking of all the pros and cons of a particular DB design approach. Some pointers: Our app has many "content" entities like News, Blogs, CMS pages, ...
0
votes
0answers
14 views

How can I update the amount on parentid

I'm using MySQL database,This is the first time that i handle this kind of project the Multi-Level Marketing.I am having problem in updating the amount of parentid if he gets paired means he has left ...
0
votes
2answers
36 views

SQL Query Help to get Quiz statistics

I'm coding a quiz web application and i need help. I've got three tables Nicknames : |USER_ID|NICKNAME| that stores USER_ID(auto increment) and NICKNAME registered to my system. Questions : ...
0
votes
0answers
59 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
29 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 ...
1
vote
1answer
61 views

How can one drop all default values and allow NULL for all columns of a table?

I'm working on a PHP script to modify the primary key (PK) of a table. My current code is: $q = "SHOW KEYS FROM $db.$table WHERE Key_name='PRIMARY';"; $keys = Query ( $q); if ( $keys) { $q = ...
1
vote
1answer
122 views

IF statement in ON clause

Can you help correct the syntax for this code? INNER JOIN Users u ON case when c.sender = ? then c.reciever = u.id else c.sender = u.id How do I do I put a CASE statement in a JOIN clause?
0
votes
1answer
36 views

DB/table design help [closed]

I have 50,000 unique cards in a table. A minimum of 2 cards and up to 20 cards can be chosen by the user and they can write a blurb about it. There will be times when the cards chosen by different ...
0
votes
0answers
12 views

Horribly slow MySQL (InnoDB) updates, multiple workers [duplicate]

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, ...
1
vote
1answer
2k views

connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host

Hello I am trying to run a website sent to me but after doing so this error appeared connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host "4X.XXX.XX.XXX", user "userXXX", database ...
2
votes
1answer
44 views

How can I speed up an sql query that round trips between two tables

I first posted this question on stackoverflow, and now I see this site, seems more relevant. These tables are not that big, but the time taken to process this query is long. What can I do with the ...
0
votes
3answers
38 views

How can I speed up an sql query that round trips between two tables

These tables are not that big, but the time taken to process this query is long. What can I do with the following queries to speed up the process taken to return results? $msc=microtime(true); ...
0
votes
1answer
33 views

insert multiple authors only if it exists in MySQL [closed]

I have a problem . I am doing a PHP -My SQL project . I got to store author/s of a conference paper in a database . But sometimes its just 1 and sometimes it can be 2 or 3 or 10 . So how do i store ...
2
votes
1answer
274 views

Unknown column in 'where clause'

I've a query in my php script $result = mysql_query("SELECT State_Id FROM state_master WHERE State_Name='$statename'") or die(mysql_error()); $row=mysql_fetch_assoc($result); return $row['State_Id']; ...
0
votes
2answers
178 views

MongoDB/MySQL - auto increment vs object ID

I am in the process of evaluating MongoDB and writing some basic PHP applications around it. Typically in my PHP/MySQL applications, I would create an ID field and set it to auto-increment on each row ...
0
votes
0answers
339 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. ...
-1
votes
3answers
78 views

What is wrong with this INSERT Statement

I am trying to use this statement to insert new data into my orders table like so: $tsql2 = "INSERT INTO pedidos (numero_local, emailUser,codigopapel,cantidad, color) VALUES ('$local', '$emailOn', ...
0
votes
0answers
29 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
1answer
67 views

MySQL Performances Issues

I'm in debate with my database admin. He claims that my queries I'm sending through PHP are the problem and he is stating several things I believe are completely false. To begin I have a site ...
0
votes
0answers
31 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
1answer
109 views

MySQL taking significantly longer to query via PHP than CLI

TL;DR: I have a query that takes under a second to run via MySQL's CLI, but over 12 minutes via PHP and I'm at a total loss on what to check next. It's a fairly horrid query, full of joins, but the ...
2
votes
2answers
54 views

How to retrieve elements from another table in a SQL query?

Sorry for my english !!! I get data from a table wp_posts and now I need to get data from the table wp_postmeta that match the ID captured in wp_posts table. The data that I need to grab in the ...
0
votes
0answers
32 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
2answers
30 views

Meaning of 'show variables LIKE '%_database'

Despite being a newbie in db administration, I have been assigned to move our crm from mysql to mssql. I have reached a point where I have met a query I dont understand and it cannot execute in sql ...
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', ...