Professional Hypertext Preprocessor, a widely used platform for dynamic web applications.
-2
votes
0answers
30 views
How can I group sql rows by hours? [closed]
My table:
tbl_questions =>
qid
question
detail
mcid
cid
uid
answercount
dateposted
status
showname
emailnotify
question_type_id
I would like to get all rows group by hours. {dateposted = Y-m-d ...
0
votes
1answer
44 views
Search speed increase
I've heard that some queries like DELETE, or changing the structure of a table can decrease the speed of the search in a table.
First: is this true , or not?
Second: is there any way to increase ...
1
vote
1answer
64 views
Why does that query cause lock wait timeouts?
From time to time, I find a lot of these errors in my PHP error log:
MYSQL.1213: Deadlock found when trying to get lock; try restarting transactionSQL
The problem persists for about 2 or 3 minutes. ...
-2
votes
0answers
25 views
Connecting To Oracle with D2K & PHP [closed]
I've D2K installed on Windows XP [client] and Oracle 9i on the server. How to connect to the database using PHP ? Installing Oracle on the client is not an option !
0
votes
1answer
13 views
Simple MySQL table copy from one server to another?
this question has kindof been answered in a number of ways. Nothing that quite fits the bill (as far as I understand it).
I have MySQL Table X on Server A. I would like an exact copy of this table, ...
0
votes
0answers
15 views
packages that php need to connect to mysql
I want to know minimum packages that php need to connect to mysql?
I know some packages such as php5-mysql, mysql-common, mysql-client,...
Also I want to know a short description about architecture of ...
0
votes
0answers
25 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 ...
3
votes
3answers
3k views
How to use insert delay with the InnoDB engine and use less connection for insert statements?
I'm working on an application which involves a lot of database writes, approximately ~70% inserts and 30% reads. This ratio would also include updates which I consider to be one read and one write. ...
-2
votes
0answers
40 views
Is CakePHP with MySQL good for Social Network developmet [closed]
I am in the process of developping a SN couple with many other features and expect million of users and my development company is suggesting CakePHP to go with instead of regular PHP and MySql ...
0
votes
1answer
54 views
Am I overengineering MySQL?
On my project, I have to make difference between registered users, and simple visitors. Both of them can set their own properites, specified in accounts and visitors table.
I identify them by cookie, ...
0
votes
3answers
35 views
MySQL is running but not working
In an attempt to tune MySQL to make it work with a recent installation of Drupal I had to modify the MySQL settings on my server. After modifying the configuration file for MySQL (/etc/my.cnf) MySQL ...
4
votes
6answers
21k views
importing large SQL file phpmyadmin
I am trying to import this SQL file in phpmyadmin and got this message
#1064 - You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version
for the right ...
-1
votes
1answer
33 views
Mysql_query Not Work? [closed]
I Have php code like this :
$cari_user = "SELECT user from user WHERE area = 'Jatim Utara'"; //query1 to find user
$hasil_user = mysql_query($cari_user);
/*----this while for ...
0
votes
1answer
69 views
Insert data in current table and update another table MySQL
I'm having problem with inserting in purchase table and updating facility table. Let's say, user made a purchase with product_id and product_quantity.
When user hit submit, I want to insert ...
0
votes
1answer
41 views
Different Result When Insert Data Contain Quote on Localhost and Online MySQL Hosting
I installed xampp on localhost and insert data contain quote using this php code
$content = htmlentities($_POST['content']);
$content_esc = mysql_real_escape_string($content);
$save = ...
-4
votes
0answers
40 views
How would i make online exam application? [closed]
As per user login The exam will be scheduled with 30 questions randomly for each user.
It have the timer of 30 - 50 mns.
Each question have 4 options and 1 answer is correct.
All the questions and ...
1
vote
0answers
28 views
Repeated values in group_concat
I have two tables, first the table food and Second is Activity:
INSERT INTO food
(`id`, `foodName`)
VALUES
(1, 'food1'),
(2, 'food2'),
(3, 'food3'),
(4, 'food4'),
(5, ...
3
votes
1answer
64 views
Get data from two tables with recursive relationships
I have a MySQL 5.1 DB, being used behind a PHP application to track permissions and other items that need to be issued to staff that hold various positions within an org. To track what privileges a ...
2
votes
1answer
490 views
Mongo connection failing with 'Transport endpoint is not connected'
I have a 2 server installation.
A web server with Apache and a DB server with MongoDB.
I am load testing it, and on ~300 RPS I am getting this error:
PHP Fatal error: Uncaught exception ...
3
votes
2answers
72 views
Understanding COUNT() as `count`,
I'm currently learning how to build a site in PHP mysql. However, I seem to fail to understand COUNT() as count and wouldn't mind some further explanation.
I get the principles of COUNT, 0 || 1, and ...
0
votes
1answer
182 views
Deleting Data From Multiple Tables
Suppose,I've a table called UNIVERSITY containing universities name:
universityID universityNAME isACTIVE
7 GNDU 1
6 PU 1
5 ...
0
votes
1answer
76 views
Large queries on MyISAM tables crashing MySQL
I have a PHP website, which is using the third-party software ResourceSpace, that when I installed it, it used my default storage engine to create the tables, which at the time was MyISAM. Now that ...
0
votes
1answer
42 views
Memcache implementation
I have a Wordpress site that uses WP Super Cache plugin in order to make my blog posts and pages stay as HTML so that less PHP/MySQL code is executed. However, there's a featured box that can't get ...
1
vote
1answer
33 views
Getting the data from a foreign key table
I have a table that relates a user to client using both their table id's
UsersClients Table
---------------------
| userid | clientid |
---------------------
| 2 | 32 |
| 3 ...
0
votes
1answer
62 views
Zip based search in mysql.
I want to implement a zip based search in mysql database, I am populating the location column in my database based on a drop-down where in I have predefined zip codes, now if a user wants to search ...
0
votes
1answer
618 views
Importing CSV file to MySQL via PHPMyAdmin
I am currently stuck and unable to upload a complete CSV file into a MySQL database. Unfortunately, the nice folks at Stackoverflow haven't been able to help me solve this issue, so I'm hoping someone ...
0
votes
1answer
62 views
good practices of creating tables in mysql [closed]
Hi I was thinking of developing an web apllication using php and mysql.
Application will give a professor the required data about the student.
i want to design application considering Engineering ...
0
votes
0answers
25 views
Connector Table Hash Values using alias
I am designing a system which stores certain hash values to represent certain pieces of text for example.
Each hash value can represent more than one text file.
I have 4 tables being the ...
0
votes
0answers
44 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
1answer
87 views
Mysql - Problem speed of access on query (Low latency query sometime)
My web application is real time site that need a speed of access on every query (SELECT, UPDATE, INSERT) that must less than 200ms
Because one of my php script task is query (SELECT, UPDATE, INSERT) ...
0
votes
1answer
86 views
how to use mysql to delete only the first ten table records?
I'm currently using php and mysql together. What I want to try is if I have ten "stable" records for the database and in the same .php file I have some text boxes so I can type in then what I typed ...
2
votes
3answers
71 views
Implementing soft delete
Could someone please show or describe to me how to implement soft deletes?
I have table of vouchers with these fields: id, username, password, serial.
I want to display a given number of rows ...
4
votes
1answer
112 views
mysql_connect() system error :111
I have 2 VPS.
I would like to connect from the frist to the second's mysql db like this :
$db = mysql_connect("94.xxx.xxx.xxx:222", "user", "pass");
I got this error:
Warning: ...
0
votes
1answer
45 views
Making a message system
I have created a messaging system with MySQL structure is as follows
`message_id` int(11) NOT NULL AUTO_INCREMENT,
`message_from` int(11) NOT NULL,
`message_to` int(11) NOT NULL,
...
-1
votes
1answer
42 views
Displaying one row at a time with no repitition [closed]
I have a database full of data. I would like to display one row from the database at time because the information in the database is confidential hence only one result can be seen at time, and that ...
0
votes
1answer
54 views
syntax error within php script sql statement [closed]
I am getting this error when I execute this script:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'table) ...
-1
votes
1answer
111 views
“ToDo” - List web application (Codeigniter) - Database Suggestions [closed]
I have to make a simple "ToDo"-Application, based on PHP and MySQL. I use CodeIgniter as framework.
I wanna do the following things:
Create ToDos
Show ToDos
Complete ToDos
Repeating Todos
I don't ...
0
votes
0answers
129 views
PHP - Binding results of an mysqli query to an associative array
I'm trying to retrieve the results of a query using mysqli and put them into an associative array. After searching online I found this post:
...
0
votes
1answer
37 views
Setting up a use voting table
I had a table to store user votes for other users. So user1 can vote for user2 (vote up or vote down). One user should be able to vote for many users, but not repeatedly to the same user; user1 can ...
0
votes
1answer
152 views
Problem with (not) Locking Tables during Restore
First time here in DBA. I'm working to create a simple and strong database backup plan. My solution that is already working to create a gzipped, encrypted backup is:
$string = "mysqldump -u$db_user ...
0
votes
1answer
36 views
Using multiple server databases
I was just seeking some higher advice on whether or not having your main data on one database, then having separate server database to use for frequent updating and reading will prove to be an ...
1
vote
0answers
51 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
...
0
votes
1answer
63 views
PHP and mySQL - Binding a parameter in an if statement
Setup:
I have 4 tables:
guestList
eventList
inviteList
rsvpList
The descriptions of the tables:
guestList
+-----------+-------------+------+-----+---------+----------------+
| Field | Type ...
0
votes
0answers
18 views
Unable to set 'NULL' in union query (consisting of two joins) in Zend for a field name [closed]
I have 2 join queries. I need to union them together. Both of the join queries have a new field say 'str_type'.
I need to make this NULL at for one join and some value in other join which is not ...
0
votes
1answer
355 views
database creation using codeigniter database dbforge class gives “Access denied for user 'username'@'localhost' to database 'database_name' ”
Using codeigniter database dbforge class I have created a database and loaded that database as the current database and created tables in localhost WAMP server. But when I uploaded it to the server I ...
0
votes
0answers
106 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
81 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 ...
1
vote
1answer
1k views
Server requested authentication method unknown to the client [mysql_old_password]
Warning: PDO::__construct(): The server requested authentication method unknown to the client [mysql_old_password]
SQLSTATE[HY000] [2054] The server requested authentication method unknown to the ...
0
votes
1answer
720 views
Connect Error (2054) - mysql_old_password issue still not solved
i use php 5.4.3 and i want to connect to a MySQL DB remotely (php script resides on a different server than the db) with normal oop way:
$mysqli = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);
...
1
vote
3answers
900 views
How can I copy data from one MySQL server to another based on a SELECT statement (then delete the data from the original)?
I have a very large log table from which I want to copy rows, putting them into the same table structure on a new server. I don't want to copy everything, only old rows, so that the table on the main ...


