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

learn more… | top users | synonyms

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. ...
1
vote
1answer
37 views

Multiple increments in table

Let's say I have a table which stores different bills. There are multiple departments using this database and every department needs to use their own incremental numbering for the bills. I do ...
0
votes
1answer
206 views

PhpMyAdmin Import Error-MySQL server has gone away/Unrecognized Keyword

So I've exported a MySQL database from PHPMyAdmin (which I access from within IIS Express on a Windows 8 machine) and I'm trying to import this database onto another machine, however on that machine I ...
1
vote
1answer
187 views

Challenging MySQL query, compare two records to find if they match or not

I have a large (88K rows) table that holds data in pairs. For a specific entity, there are 2 records, with UID's and then a load of additional data. I need to take each pair (pairs can be found by ...
1
vote
1answer
205 views

How does mysqldbcopy function

I have a database called LIVE and I want to create a scenario were I copy the LIVE database every night at 2:30 am. I want the copied database to be called REPORT. So every night I want the REPORT ...
0
votes
1answer
82 views

MySQL shows previously deleted data

We're running MySQL on Azure. We have three very small databases. The main database is POI and it hold 11 static records. During the day a few records may be added and deleted again within 1-2 hours. ...
0
votes
0answers
67 views

MySQL how do I select consecutive rows on table and back to start at end of table?

I have a little website (actually in dev stage) to manage race standings for a game. I have a table "race" with 19 rows representing 19 grand prix. I have made a page where I show 5 grand prix based ...
1
vote
2answers
189 views

How can I make an automatic copy of a MySQL database to another MySQL database on the same server?

I have two MySQL databases called LIVE and REPORTS on the same server. I want to copy the LIVE database and all its contents into the REPORTS database everyday at a specific time frame between 1 am ...
0
votes
1answer
109 views

Error code 1064 when trying to add anything manually

So i tried adding via php and i noticed i got a error , so i went into phpmyadmin and tried adding it manually by clicking the SQL in phpmyadmin and write in INSERT INTO `test`(`IDtest`, ...
0
votes
1answer
40 views

table design for display content

In my previous work station, I saw them have a table design across all website they have worked on displaying editor content like this: column|page_id| title |content_1|... |content_n| lang ...
0
votes
1answer
47 views

Update database table

I'm developing a website using PHP. I have a MySQL database and it has three columns called name, latitude and longitude. It is as follows. Name | latitude | longitude ---------------------------- ...
0
votes
0answers
104 views

Slow response from mysql and web application

We have a Mysql server and apache running on ubuntu via VMWare. Server has 2 CPU cores and 4GB allocated to it. On the server is a web app via php cake framework. One of our developers noticed we had ...
0
votes
0answers
39 views

SQL Schema - Messed up my schema and want to revert

I was playing around a bit with my database.table schema (keys) and I have now messed it up. This is the original schema: CREATE TABLE IF NOT EXISTS `xeon_stats_clicks` ( `id` int(11) unsigned NOT ...
0
votes
0answers
66 views

MySQL Match … Against query very slow

I work on a website running on Propel ORM and I have this query: if(isset($args["QueryText"]) && $args["QueryText"] != "") { $query = $query ->withColumn("(MATCH (Request.Subject, ...
0
votes
0answers
20 views

Sphinx result set error?

I'm getting below error when using sphinx search, selectmylikesfrom tableindex,tablert; ERROR 1064 (42000): INTERNAL ERROR: the column 'mylikes/mylikes' does not present in result set schema ...
1
vote
1answer
59 views

Entering multiple entries in SQL where the count increases by one

I do apologize for the uninspired title, I'm not sure how best to put it. Another person helped me massively in another question I posted regarding the structuring of data. The solution has left me ...
1
vote
0answers
125 views

PostgreSQL 9.4 - Allow access from PHP

I would like to configure PostgreSQL 9.4 to allow connections from database users with passwords from PHP on both the command line and through Apache on a CentOS 6.6 box. I installed PostgreSQL with ...
2
votes
2answers
408 views

MySQL search comma separated keywords

I have keywords column in my table and there are comma (,) separated values. example: hello, world I have search engine with same codes: $search = $_GET ['search']; $query = $db->prepare("SELECT ...
0
votes
0answers
23 views

How to get data from join only if all the services are available

I have created a service table that contains list of all services available with a vendor. For example suppose my vendor is a salon and it provides services like hair cut, massage, waxing, threading ...
0
votes
0answers
33 views

What is the fastest way to do a REGEXP find and Replace in MySQL database?

I have a table with 700,000 entries and I need to check each entry for 1,000,000 words and then replace the word if found from hello to #~hello~#. Words can occur multiple times in an entry and need ...
0
votes
0answers
12 views

Checking user right

Table's structure: id------username-----password------status 1---------derek--------123---------admin 2----------rob---------321---------worker I finished simple login page and its working. On the ...
0
votes
0answers
58 views

How to selecting data from two queries using union?

I have three tables. I am trying to taking the data with two times interval after then subtracting from first two second for every possible row and getting the ledger report. Solution is given by: ...
0
votes
1answer
69 views

Query distinct then select option then choose and query choosed as html result on page

Structure of database "diary": id------user_name-----day-----month------post 1--------erik-------- 3--------dec-------something 1--------erik---------3--------dec-------12345 ...
0
votes
1answer
88 views

Moving data from one table (a million records in it) data to another table which in remote location? (MySQL)

I want to move data from one table which have more than 2 million records in size into another table which is in a remote machine, and that moving should support Logging Restart Exception handling ...
0
votes
1answer
46 views

Select distinct then calculate a number

Structure of table: user-----headline----day----number 1 -----lotr -----1 ----- 2 1 -----lotr -----1 ----- 2 1 -----cpo -----2 ----- 2 1 -----cpo -----3 ----- 6 2 ...
1
vote
2answers
220 views

Selecting random rows from database initially while preserving that order later

I am building a quiz app, in which the student can login and can select the option of give exam. I want to show multiple choice questions to students randomly. I stored all the questions in one ...
1
vote
1answer
32 views

Which join to use

So I have a database I'm trying to convert to a new one, it has around 40k rows in let's call it table A, now the actual data is in table B which has over 1.6 mil rows. When I'm writing my PHP script ...
2
votes
1answer
60 views

Storing undetermined amounts of user information (MySQL)

I've been looking into the best way of storing an undetermined amount of information submitted by a user. A friend of mine suggested using nested tables, however these don't appear to be a thing in ...
1
vote
2answers
270 views

Insert into specific table if the user session group

I am trying to insert data into specific table by user session and group. The tables are users, workers, help. Structure of table "users": id | username | password | group ...
1
vote
0answers
61 views

How to import Sqlite database into another Sqlite database?

Hello everyone I am developing Desktop Application and using the WebSql Database this database is created into this path: C:\Users\Admin\AppData\Local\Google\Chrome\User ...
0
votes
0answers
43 views

Create a mysql database with scheduled queries

I want to create a system where a database only returns the most recent select query every 20ms,and otherwise returns the most recent one in memory. I am not sure how this can be achieved. I am using ...
1
vote
1answer
59 views

Optimization of complicated sums and counts in related tables

I have a categories table, which have two columns, id and name. I have a types table, which have three columns, id, category_id and points. I have a products table, which have three columns, id, ...
0
votes
1answer
74 views

SQLAnywhere : Installation PHP extension - variable LD_LIBRARY_PATH not detected by extension

I'm trying to install the SQLAnywhere php extension to connect my website on a distant Sybase database. But I can't declare the LD_LIBRARY_PATH variable which isn't detected by the extension. A ...
1
vote
1answer
20 views

Do queries called from within a transaction but found within another method act the same?

Imagine the following code: class foo { public function bar() { // Start the transaction $transaction = $this->db->beginTransaction(); try { ...
0
votes
0answers
31 views

Loop gets terminated in case of many SQL Insert Commands

I am executing SQL Insert commands inside a loop that runs for 1000+ iterations. The loop gets aborted without any error/exception in between after executing 700+ inserts. If I comment the DB ...
0
votes
0answers
38 views

Create user to view part of data only

I would like to be able to create new users so that they can view part of the data in a table I defined without having to create a new table and pull the data for them every time. Let's say I need to ...
2
votes
1answer
54 views

select from database with special characters

I am using php select * from `outstanding` where `lcocode`='PN007\00128' select * from `outstanding` where `lcocode` LIKE 'PN007\00128' kindly suggest code for fetching data with backslash I used ...
0
votes
1answer
85 views

MySQL DB Replication

Okay so here's my scenario. I have two applications that share some tables from the same DB. Let's call them App1 and App2. Lets also assume the DB used here is called DB1. App1 and App2. App1 is on ...
0
votes
1answer
192 views

Database-design for a small filter / search tag function

I'm building a search function in php for a database with 1k to 4k articles. It's going to be built on a tag system. I've been reading some tutorials, blog posts, q&a etc about it. Most important ...
0
votes
3answers
104 views

How do I echo data from two tables that are associated to one user in php

Say I have tbl_company with these cid------- cons_no-------- company_name ------- phone ------ address 1---------- q1----------------aple------------------------22222-------newyork 2 ...
1
vote
1answer
93 views

Same SQL stall on server but work on local ( on slower machine )

I have this strange issue that because of my limited knowledge about Mysql I cannot understand, I will really appreciate if somebody can enlighten me and point me to how to debug the issue. ...
0
votes
1answer
359 views

compare results between two select queries mysql

i'm making test application where users will input their select queries in input box and the application have to compare them if they are identical with "correct answer" query. "Correct answer" query ...
1
vote
1answer
174 views

Best practice to create a database schema for Open Auth (Social logins)

I've done a database schema for user management alongs with their roles and permissions. The problem actually began, when I decide to integrate a multiple "Open Auths" such as Facebook Login, Google ...
1
vote
1answer
168 views

How to update a whole document in MongoDB using PHP?

I want to update my older entries through the PHP interface in MongoDB. First, I get data from the text fields and then store that into variables. Then I use those variables to update data in Mongodb. ...
1
vote
0answers
57 views

insertion creates duplicate with same data

I am using MySQL with PHP. I fetch data from a third party using SOAP. I have an issue with duplicate insertion of data. This occurs once or twice a day. Say there are 10 records ready to enter into ...
-1
votes
1answer
159 views

Pivot data - dynamic column names [duplicate]

I am trying to pivot data. The column names have to be dynamic based on the row values for subject_id column. Table Sid marks subject_id 101 20 3 101 25 2 101 60 1 104 22 3 104 ...
2
votes
0answers
43 views

selecting data from joomla back end mysql

I have developed a front-end that call a php server side service that adresses the mysql. On my local everything works perfectly, but on distant 1and1 machine, it only works for tables created by ...
2
votes
1answer
108 views

How to add DATETIME value for session user

I am maintaining two tables: Employee table consists of username and password(for logging in) log table consists of login and logout time for the session user With the click of a button, I should ...
0
votes
1answer
220 views

Can I split mysql the search results into two tables in php?

I have index tables with multiple columns: s | s1 | s2 | s3 | s4 | s5 | s6 | s7 | s8 | s9 | s10 | s11 | s12 | ------------------------------------------------------------------- 0 | 1 | 0 | 1 | 1 ...
1
vote
1answer
311 views

MYSQL - Timeclock Count Hours In/Out for each day of current week

Below is my table for my database timeclock that records each record of an employee clocking in/out. I am wanting to create a function that returns hours for each day Monday-Sunday of current week. ...