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

learn more… | top users | synonyms

-2
votes
0answers
10 views

get row number on macting perticuler value using PHPexcel lib [on hold]

phpexcel lib @version 1.8.0, 2014-03-02 $objPHPExcel->setActiveSheetIndex(0)->getrow() i want row number on matching particular cell value something like .. get_row_number("match_value")
-6
votes
0answers
26 views

How to Display other user details through where clause = Session variable [on hold]

I want to display the user's Firstname, Lastname, Birthday and Gender. The session works fine but i dont know the Echo code for this, Thanks!! $sql = "SELECT lastname FROM user ...
0
votes
3answers
272 views

Why does databases use text? [on hold]

This might be a little dumb question but why do we save text in the db instead of something smaller? Couldn't there be some other way to store data in the db like in a compressed form, and then have ...
0
votes
1answer
81 views

What is the problem will happen if I create auto generate ID without using mysql auto increase of mysql table by my self?

I would like to ask you a question about MySQL AUTO_INCREMENT. I already created my own function to generate AUTO_INCREMENT when the user inserts any data input a table in MySQL. This function works ...
-5
votes
2answers
230 views
+50

I am trying to implementing a stream/notification feed, but I have a dilemma

For many months now, have I tried to figure out how to implement a stream/notification feed? It can be implemented by having three tables in the database (e.g. activities, user, and user_activities) ...
2
votes
2answers
177 views

matching usernames with their password

We are working on a simple login/registration form. Our login script checks to see if the username and password exist in the same row of the database. If it does exist, we bring the user to a welcome ...
0
votes
0answers
74 views

Using a PHP loop or MySQL table for arrays values

I have the following results page from the previous form: <?php //Get the form results (which has been converted to an associative array) from the $_POST super global $musicgenres = ...
0
votes
0answers
34 views

MySQL schema migration table and field mapping

I have inherited a project with the following set of components: REST API, public web application and internal admin web application and MySQL dB. I am commissioned to develop updated version of the ...
0
votes
0answers
35 views

Avoid foreign keys on an 800-GB database? [migrated]

This question is for the experienced developers out there. My friend recently told me that his employer has a legacy code base whose MySQL database has now grown to around 800 GB in size. What's ...
0
votes
0answers
41 views

Encrypted values (mcrypt_encrypt) in URL parameters generating different results while requesting.How to tackle the situation? [migrated]

I am using the following function to encrypt a string ($str) using a key ($key) to make a unique key. Sample Code: <?php $key = "####"; $str = "123456789"; $encrypted_key = ...
0
votes
1answer
48 views

How to handle the default time when user is selecting dates to filter on?

We have an ASP.NET application which allows users to report on their data. We have a number of reports that the user selects the start and end date from a datepicker and then we returned the filtered ...
1
vote
2answers
55 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 ...
0
votes
3answers
300 views

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

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
1answer
55 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
88 views

Creating Objects from a JDBC ResultSet, best practice? [closed]

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 ...
0
votes
1answer
76 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
368 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
292 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
90 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
95 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
41 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
141 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
141 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
70 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
201 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
203 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
109 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
157 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
26 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
226 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
334 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
215 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 ...
0
votes
1answer
244 views

How to get real time notifications, when a database change (insert, update, delete) occurs?

I'm creating a dashboard which should monitor a database table. I have only database access (no application layer). The table is rather large (10 million rows), however not changing rapidly (100 ...
3
votes
2answers
161 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
341 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
579 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
17 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
224 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
198 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
155 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
126 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
562 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
442 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
90 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
242 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
265 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
518 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
120 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
503 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 ...