Questions tagged [crud]

The four basic operations for a data management system : Create, Read, Update, Delete

The four basic operations that can be used on a relational database table are

  • C reating
  • R eading
  • U pdating
  • D eleting

A CRUD application is one that performs these basic operations. A CRUD framework is an application framework that gives these functionalities as a base for the development.

Also see: , ,

4608 questions
1
vote
1 answer

Custom Like count with JavaScript, PHP, MySQL

Hoping you can help me. My Goal Creating a custom Like(♥) button with a counter. Store (INSERT) onclick() output value to MySQL Increment (UPDATE) stored value by one(+1) Retrieve (READ) lastest incremented value from MySQL and display on web…
Andrew C. Duarte
  • 237
  • 2
  • 15
1
vote
1 answer

How do I mock a simple CRUD interface correctly?

Imagine I have the following simple example interface: public interface UserDB { void addUser(User user); void updateUser(User user); User getUser(String id); void deleteUser(String id); } I want to write tests with Mockito to test…
Kenyakorn Ketsombut
  • 2,072
  • 2
  • 26
  • 43
1
vote
1 answer

Auto Increment Id MVC5

I am new to MVC and i'm trying to create an auto incrementing id upon using CRUD create. I've created my model with id : [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int BookingId { get; set; } and my controller:…
coto2
  • 179
  • 4
  • 15
1
vote
1 answer

Entity Framework CRUD operations on a datagrid

I have a List bound to a datagrid and am trying to figure out how to save all the changes to the database (using Entity Framework), not just one row at a time; OR, at least a better way to commit changes from the datagrid to the database. I am…
steveareeno
  • 1,925
  • 5
  • 39
  • 59
1
vote
1 answer

I can't make a crud based search form. Why it is not working?

My code: models/db.py .... dbmy = DAL('mysql://user:user@localhost/test',migrate_enabled=False) dbmy.define_table('Firewall', Field('disabled','text'), Field('src_port_first','integer'), …
Ermi
  • 69
  • 5
1
vote
1 answer

Can I design controllers by verbs? If not, why not?

Using the Laravel PHP framework, I'm wondering about the design of resource controllers, where you define a new controller for an individual entity, say, "project" or "article", and then provide methods based on the different CRUD operations. In…
Luciasar
  • 393
  • 3
  • 7
  • 21
1
vote
1 answer

Client and server: data filtering and sorting synchronization.

I have a java client-server crud application. In client I open person table and I can set filter for example by city,age,sex. Besides I can add some sorting rule, for example sort by name,and after by age. These filtering and sorting rules are sent…
Pavel_K
  • 10,748
  • 13
  • 73
  • 186
1
vote
2 answers

Angular firebase foreign key / ng-repeat

I have two tables in firebase Departamentos -> parent and Ciudades -> child. When I'm showing the cities in the ng-repeat view, I need replace the $id Departamento to the name in the Departamentos table. How can I do it? Database: View:
1
vote
1 answer

Quick & dirt CRUD interface to SQLAlchemy?

I'm researching software components to use in a future development of a business logic web application. It's gonna be written in Python and we are targeting SQLAlchemy as ORM. The app will be used by other software apps via a REST-like interface…
Luke404
  • 10,282
  • 3
  • 25
  • 31
1
vote
3 answers

Beginner Rails CRUD

Quick beginner question about new and create methods. The Ruby Guide shows this example: def new @article = Article.new end def create @article = Article.new(article_params) if @article.save redirect_to @article else render 'new' …
inthenameofmusik
  • 617
  • 1
  • 4
  • 16
1
vote
1 answer

Error: .$save is not a function (AngularJS)

The non-GET instance action $save doesn't work in my example. I always get the Error, that $save is not a function. The problem is, I don't know where I have to define the $scope.example = new Resource();, because in my example I'm using 2…
yuro
  • 2,189
  • 6
  • 40
  • 76
1
vote
1 answer

Volt: Equivalent of destroy_all?

I have a form with a "reset this collection" button. Looks kind of like this: In my controller, I do this: def reset_patients puts "destroying" store.patients.each{|p|…
Steve Ross
  • 4,134
  • 1
  • 28
  • 40
1
vote
2 answers

How Can i copy a mysql record and save with different id using PHP?

I am new in PHP. I have an idea. Can i copy a recoed of table and save it with different id in same table? For example i have a web form with different fields. I use that form to store data in database. Now i have a page where i display that record…
sunny
  • 1,511
  • 5
  • 20
  • 57
1
vote
1 answer

Unable to connect to MySQL and perform operations in Play Framework 2.4

I am very new to Play and Java (i come from a Python and Django background :) ). I am trying to connect to MYSQL database and read values from it. However, after trying for about few frustrating hours i am unable to do so. Please Help. My build.sbt…
200ok
  • 210
  • 4
  • 14
1
vote
3 answers

What's the best way to handle recurring tasks like CRUD operations in Java?

I'm trying to write classes and methods to minimize recurring tasks. For instance, I'm planning to write a generic DAO (Database Access Object) class in Java which can do the basic crud operations by accpeting the inputdata. For example, the…
1 2 3
99
100