0
votes
0answers
22 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, ...
1
vote
0answers
28 views

Script to query MongoDB with PHP [closed]

With Code Igniter and MySQL I do: $this->database->query('select * from table'); But I don't know how to use MongoDB. Can I still use this the same way to query MongoDB? ...
0
votes
2answers
64 views

Want to show last month highest scorer details grouped by week

I have a table of data: id | name | userid | score | date | -------------------------------------------------------- 1 | john | 4 | 233 | 2014-02-02 2 | ...
2
votes
1answer
129 views

What is the difference between MySQL and PostgreSQL in terms of writing SQL queries? [closed]

Other than performance and security is there really any difference between MySQL and Postgres like SQL queries, built-in functions, procedures and so on? I'm asking this because I'm familiar with PHP ...
7
votes
1answer
102 views

Deleting large amounts (4 million rows) of mysql data efficiently, on a very regular basis

We have a mysql table that at any given time has about 12 million rows. We need to delete old data to keep the size of the table somewhat manageable. Right now we are running this query daily, at ...
0
votes
2answers
50 views

Disk write in iotop when doing mysql “Copy to tmp table”

I have just moved servers from a two-server configuration with the application and database server running separately to a one-server LAMP stack. Unfortunately the issue that I have encountered on ...
0
votes
0answers
24 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
1answer
54 views

Automobile database logic

I am building a web based quoting system for a local automobile dealership. I think I have figured out the logic for the databases but I want to get a second opinion before I start just to make sure ...
0
votes
1answer
41 views

importing database backup to phpmyadmin return #1064

When I tried importing mysql database backup to MySQL using phpMyAdmin I got the following error message: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your ...
0
votes
1answer
25 views

MS Access + MS SQL Server for 1160+ users - Is it worth it? (Please Help!)

Our school in Delhi (India) wants to develop a professional and robust in-house database (SIS) that should handle vast amount of student information, including admissions, registration, re-enrollment, ...
1
vote
2answers
64 views

MYSQL joining 3 tables with left join

I have these tables: pupils: (id_pupil, name, surname, email, user, pass, level, class) incidents: (id_incidents, date, time, type_incident, comments, id_pupil, id_user, subject, id_trimester) ...
0
votes
1answer
54 views

Even after permissions are updated, I still get the error permission denied for relation users

I'm getting the error ERROR: permission denied for relation users and have tried to update privileges using both grant all privileges on all tables in schema ops to my_user GRANT ALL PRIVILEGES ON ...
-1
votes
0answers
53 views

ERROR 1136 Need help mysql [closed]

I am working on my sql via mysql. I need help with a code. I am able to create the table; however, I am having trouble installing the data into the table with out getting the ERROR 1136. CREATE ...
-1
votes
1answer
56 views

Database update rather than cycle through? [closed]

I'm new when it comes to MySQLi and databases so I'm not sure how exactly to title this question. I have a PHP script setup to where it inserts data into the database. Pretty self explanatory. ...
0
votes
0answers
69 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
223 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
156 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
1answer
3k 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
1answer
194 views

MySqli - select from db based on time difference with CURTIME() or SUBTIME()

I have a db with some customers data. There I store their last login time as datetime. I want to run a cron php script every min which will query mysqli for their last login datetime and if that was ...
2
votes
1answer
255 views

Parsing and binding variables for SELECT .. WHERE column IN ( .. ) queries

I'm looking to make sure that all queries in a php web application have proper use of bind variables to minimize parsing of the queries. I'm wondering how Oracle parses queries that compares a ...
1
vote
1answer
126 views

Group activities in activity feed by users and products

On my website I'm building an activity feed where I got the basics done and are now making some improvements here and there. One of them is the grouping. I've built it so that if multiple users buys ...
1
vote
0answers
173 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
1answer
60 views

Sanitizing a form's database input while retaining basic HTML markup

Is there a way to sanitize database input (say, for a comment form), which also allows for the end user to use basic HTML styling markup? As in, if a user wraps their text in <i>/<em> or ...
0
votes
0answers
553 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; ...
1
vote
0answers
796 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 ...
1
vote
1answer
305 views

How to get a unique highscore per user

I have the following tables: users, highscores I would like to get the top ten best results in highscore. The scores should be unique, meaning one score per user. I tried using INNER JOIN and GROUP ...
3
votes
2answers
456 views

Testing Query Speed

When I'm running a query for the first time, it takes x miliseconds to be executed. When I run it the second time it takes a lot less time. I assume that it is some caching involved in this mechanism, ...
4
votes
2answers
702 views

MySQL connection doesn't work anymore

I had two MySQL servers running (127.0.0.1:3306 and 127.0.0.1:3307). Now I get this strange error: mysql_connect(): Lost connection to MySQL server at 'reading initial communication packet' I can ...