MySQL is an open-source, relational database management system.

learn more… | top users | synonyms

-4
votes
0answers
31 views

How do i put a mysql cursor command in a loop in python [on hold]

this is the code i have so far but its not looping it only return the first and not the others. class moments(): def __init__(self): cursor.execute("SELECT item_code FROM list WHERE user=%s ...
-2
votes
0answers
28 views

Is it possibile to decide how to partition data in MySQL Cluster?

Let's say I have this table CREATE TABLE `test` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `customer_id` bigint(20) NOT NULL, `customer_data_field` varchar(255), PRIMARY KEY (`id`) ) ...
0
votes
2answers
28 views

What's the best way to track updates when syncing data from MySQL remote server to local SQLite database?

I'm making an iOS App, well, two actually. App A will be able to write TO-DOs to a remote MySQL database, and App B will be able to read what App A has written/modified. App B needs to be always ...
1
vote
3answers
235 views

Is it bad to store data in JSON form or should I use mySQL? [on hold]

I've been building an application and the whole thing is built around a simple data storage system. Create an array. Convert it into JSON. Add <?php die() at the beginning to prevent access. ...
-3
votes
0answers
11 views

Inserting images from MySQL to listview in vb.net [on hold]

I am having a stuck. I'd like to insert all images from MySQL table to listview in vb.net, but i don't really know how. I'm using a blob for my images. I've already looked up for that on google but i ...
-2
votes
0answers
23 views

Accessing large lists of words PHP Array or MySQL [closed]

I'm creating an application that grabs a list of words, and mashes them together. Example: Hello, World, Coding Output: Helld, ingdld, Codrld I want to have many lists of words. I originally was ...
3
votes
1answer
52 views

PHP mysql checking for relational equivalence

Suppose I have a users table and in that users table I have a role_id. In my roles table I have: users - id - role_id roles - id - name roles id | name 1 | admin 2 | normal Now ...
-1
votes
2answers
52 views

Creating Objects from a JDBC ResultSet, best practice?

I'm still in the process of learning JDBC and web services (currently forced to work with SOAP, but more interested in REST). I want to save each table row from the ResultSet in it's own object. There ...
2
votes
0answers
42 views

How to run WordPress across 2 VMs for high availability [migrated]

Microsoft Azure requires that applications utilize two instances across multiple data centers in order to achieve their "high availability" SLA and ensure your sites don't go down for routine ...
-2
votes
0answers
34 views

PHP mysqli adding multipe entries for one insert [migrated]

the following short PHP code should be adding 1 entry into the database table. however when I run this I find 3 identical entries. MySQL Server version: 5.5.39 - MySQL Community Server PHP/5.4.31 ...
0
votes
1answer
54 views

Algorithm to maintain a blog sign up page

I have a functional sign up page for a blog that updates a database with a users name, email, profile picture and a short bio. The General information page and the profile picture upload/bio page are ...
1
vote
0answers
40 views

Storing/caching SQL query

If I have a very long-winded SQL query (that has multiple subqueries), but the result of which is unlikely to change from hour to hour (or even day-to-day, or possibly even week-to-week) is there some ...
1
vote
4answers
194 views

Java desktop app with mysql database

I'm currently in the process of learning Java and swing and in doing so am trying to create a desktop app. As part of this app I have set up a mysql database which the app is connected to, however ...
0
votes
4answers
279 views

How can I keep browser URL secret when editing data?

Suppose, There is a user list. <a href="user/5">Edit</a> <a href="user/6">Edit</a> When a system user clicked to edit a user info. Then it goes to url to browser like as ...
1
vote
2answers
58 views

Process string before or after insert into mysql

I have a device network where each device has different sensors (temperature, humidity, etc..). Each device uploads raw measured weather data every 10 seconds to a apache/php/mysql REST API. There are ...
1
vote
2answers
80 views

Is it safe to only use intval to sanitize user input for a database select?

Is it safe to only use intval to sanitize the user input for a database select, as in the following example? $id = intval($_GET['id']); $query = "SELECT * FROM table WHERE id='$id'";
0
votes
0answers
33 views

BCMath vs MySQL: performance

Scenario I am working on a web application that handles financial transactions, and my code will need to be reusable for everything from consumer carts to manufacturer/distributor shipments. The ...
1
vote
3answers
112 views

DB Schema design : single table with more columns vs multiple tables with fewer colomns

What would be better DB design for a social network website. A single table with more columns and less rows or multiple table with fewer columns but more rows. For example: User can post an update on ...
-1
votes
1answer
134 views

What can I use to distinguish a user chosen name from other identical names [closed]

I am writing a dating/social website using php and mysql. We want the users to select a name for themselves, but we don't want to make it unique. It is not going to be used for searching. It is ...
0
votes
1answer
69 views

Should migrations modify data?

Imagine you have a table that has 5 columns, and you need to split this into two tables, because in your iterative process, your application has increased in complexity. Should migrations change the ...
1
vote
2answers
160 views

Making a safe PHP login system [duplicate]

I am making a php website that requires user login. It has a remember me function. I would like to ask if the following approach is safe ? User logs in with correct username and pass (and remember ...
1
vote
2answers
197 views

NoSQL or MySQL? [closed]

I'm developing an app that requires to save data that is not consistent across all rows. These database entries represent different kind of sport activities. Let's take an example: In football the ...
1
vote
1answer
105 views

Multiple MySQL update calls per second, can some of them be “missed”?

I have simple question, I think its not that big of a deal, but I'd still like to ask it as its boggling my mind for past 2 days a lot. What if I have a poll where instead of inserting answers to ...
1
vote
2answers
128 views

Composite Primary Key drawbacks

For website that I maintain (eCommerce) I now need to make a table that seems to require Composite Primary Key of 5 columns. I never used 5 column as primary key before, only 2 and rarely 3. I ...
0
votes
0answers
22 views

Advice on paging tree structured data

I'm in the process of building web based a commenting system, for which the comments are rendered in a reddit / disqus style tree structure. The MySQL schema uses a string of ancestor id's, and the ...
1
vote
3answers
185 views

Auto-save user input - the smartest way?

I'm developing a social network website and I'm working with php/mysql/jquery and I want users to have the most user-friendly website experience. That's why I try to avoid a save (submit) button at ...
6
votes
3answers
331 views

Do common relational database systems work 'out of the box'? [closed]

I'm quite new to software development and whenever I come across small projects which involve storing (relational) data I always ask myself if something like a micro-blog (or any other project with ...
3
votes
2answers
168 views

Do I need a web-service for this case? Data-synchronization over multiple clients

I'm new in this area and a little bit confused about my current thoughts on a web-service implementation for my application. I want to synchronize all connected clients with the current data on a ...
3
votes
2answers
125 views

Design interface for WebService to access several MySQL databases

I am currently trying to design an interface for a WebService that can access several MySQL databases. There will be 4 operations available, Add(), Read(), Update() and Delete(). The WebService just ...
4
votes
1answer
288 views

Social network notification system

Background I am working on an app for a client that includes some social networking features. I was originally developing the mobile front-end, but circumstances have left me in charge of developing ...
1
vote
0answers
446 views

Android, PHP session and JSON object retrieval

I am working on an app in android studio.. it currently has a login and registration system that are linked to a database and both work perfectly. I am now trying to carry over the user id value ...
0
votes
0answers
16 views

Edit files on multiple domains on Mambo CMS

I have multiple domains on same web server, all running on Mambo CMS. Each site uses same template and has roughly same site structure. I need to edit the same page on each website - is there a ...
-3
votes
1answer
207 views

using node.js server with mysql-module and PHP for a penny-auction website? [closed]

I'm building a penny-auction platform like DealDash and just read into the WebSocket and node.js topic. I used PHP, MySQL and Ajax to build the website. I'm nearly finished and just have to implement ...
1
vote
1answer
179 views

Am I planning my database/backend correctly?

I'm an iOS developer and to be honest I'm not really looking to become a database expert right at this moment, but I do need to know how to properly plan out what I believe to be a pretty cookie ...
0
votes
1answer
133 views

How to structure programs that interact with databases? [closed]

I've just finished a book on MySQL and I'm in the infantile stages of learning to couple that with Java. I know that the technology I need to learn is called JDBC and that it essentially allows you to ...
3
votes
2answers
119 views

How to infer the result of a query?

To understand what a query does, I have always thought the following is the procedure on evaluating a query: Form the table as specified in the FROM clause. Pick the rows from that table as ...
-2
votes
3answers
395 views

How to store integer array in mysql database [closed]

I am making a college attendence system so i need to store attendence of thousands of students. if I go for 1 column for each day then it will take 12*30 almost 360 column for a year. So I want to ...
1
vote
2answers
408 views

Is this a race condition?

I have a friend arguing this is a race condition, but I'm struggling to understand how. This is for a web application using PHP and MySQL where users can login and create tickets, these tickets have ...
1
vote
2answers
87 views

What is better for scalability for this specific dataset, MongoDB or MySQL?

I have a web app which has users, forms, and volunteers signed up on those forms. Currently I am using MongoDB and have it setup with a collection for admins, and a collection for forms with ...
3
votes
4answers
203 views

How to save many changes to database data?

I'm working on a feature which will pull many (say, 1000-5000) rows from a database, display them to the user and allow the user to edit them. This editing may involve changing text; adding rows at ...
0
votes
1answer
225 views

php Database operations in separate files?

I have a single page application. Select boxes need to be filled with select queries from the database. How do I structure the application? Currently I have a file add_details.php. It contains a ...
1
vote
1answer
430 views

Need to store Multiple Images (path) into MySQL after upload [duplicate]

I am trying to build my own little eCommerce CMS, and i want the expert opinion on how to handle multiple uploaded files (images). For Example: A user adds a new item, fills the necessary form data ...
2
votes
1answer
112 views

How to deal with server-side and client-side naming conventions that clash? [closed]

I have a project that uses the underscore naming convention for the MySQL database and PHP scripts but uses camelCase for the javascript application (a common scenario I'm sure). However, once JSON ...
0
votes
3answers
325 views

When to use a nosql database such as mongodb over mysql?

I'm new to the concept of nosql databases and have never used it. Based on what I've read and the little that I've understood I still don't see how they can be particularly useful if you can't make ...
0
votes
2answers
85 views

DB Schema for a questionnaire - Different output from different combinations of responses

A user is required to complete a questionnaire - answering the questions in various categories. Depending on the responses from the user, the user will be presented with a number of recommendations. ...
1
vote
2answers
117 views

Best Way To Store Images For Mobile Synchronization

The scenario is, I have a Web Dashboard (Developed using PHP + MySQL) and have Android and iOS Apps synchronizing data from the Web Dashboard (only one way i.e. Dashboard to Mobile Apps) Now the ...
1
vote
1answer
387 views

mySQL / PHP design pattern - one function multiple queries

So here's the gist of it. I'm looking for a design pattern where I can have one function, say queryHandler that gets the query and the parameters from a number of different functions and returns the ...
0
votes
1answer
281 views

Like structure table with Laravel and showing the most popular content at top

I am using Laravel to creating a website, my users can post questions and other users can write their comments under the post, each comment have Up vote and Down vote, and users can voting for ...
1
vote
0answers
38 views

Database integration of Rails and Laravel apps

I have some very small apps on a VPS running ruby on rails and a co-worker also have some of his own apps running on laravel at another VPS. So far we dont needed to share any data among the apps, but ...
50
votes
6answers
6k views

Should Latin-1 be used over UTF-8 when it comes to database configuration?

We are using MySQL at the company I work for, and we build both client-facing and internal applications using Ruby on Rails. When I started working here, I ran into a problem what I had never ...