const express = require('express'); const upload = require("express-fileupload"); const editJsonFile = require("edit-json-file"); const fs = require('fs'); const app = express(); app.use(upload()) app.use(express.url ...
I have a website where users can input text in a form, which is then displayed using a query plugin. However, I noticed that whenever the page is refreshed, all the user input is lost. How can I ensure that the data stays on the screen even after a refresh ...
I am a beginner when it comes to MongoDB and node.js, and I could really use some guidance on performing a mongo lookup. My goal is to join two documents based on a specific condition within my Conversation model using mongoose, node, and express. Let&apo ...
In my setup, I have implemented phpunit to test a specific webpage where normal users are able to click a button that inserts data into a mysql database. With the help of PHPUnit/Selenium extension, I can automate user clicks on buttons like this: <?p ...
In my project, I'm aiming to dynamically update a text field (Price) based on the selection made from a drop-down menu (List of Products). Specifically, the text field should display the price of the selected item. This task requires the use of AJAX, ...
I need to store checkbox items in a database based on employee department access. The goal is to only add checked items into the database. Code snippet to display door access if checked: $door1 = $_POST['door1']; echo 'Door access availab ...
Currently, I am attempting to establish a connection between NODE.JS and Postgresql with PGAdmin V4.5. However, I am encountering the following error: (node:1184) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:5432 at TCPConnect ...
My challenge lies in using a single database for both an Android application and a website. This setup allows the admin to update the website and app simultaneously through one admin panel. The database, which consists of 15 tables, presents a roadblock ...
Hi there! I have a question regarding updating a date in MySQL using PHP form. Here's the code snippet: <?php $sql = "UPDATE users set expire_date=CURRENT_DATE + INTERVAL 30 DAY WHERE email='" . $_SESSION[&a ...
I am working on a code that dynamically adds fields to a form, you can see it in action on this jsFiddle. My question is, is there a way to keep the newly added fields even after the form is submitted and the user returns to the page? I'm not looking for ...
If we consider a hypothetical json file labeled 'my_data.json' with the following content. {"a": [1, 2], "b": {"c": true, "d": "1991-02-03"}} {"a": [3, 4, 5], "b": {"c": false, "d": "2019-04-01"}} In scenarios where a join operation based on attribute d ...
Trying to configure a PHP site for production, not development use. The goal is to hide all PHP errors from the user, but log them in a database table instead. However, when changing the defined constants to FALSE, both error display and logging fail: err ...
I have set up a form using RSForm with two textboxes. The first textbox is named km1 (new_km) and the second one is named km2 (old_km). Initially, the user will input their car's kilometer number in the km1 field (new_km). When the user revisits and ...
In the process of developing a program, I am focusing on analyzing smaller companies and gathering data on insider buying. The current script is designed to collect data from every company in a comprehensive table ('http://openinsider.com/latest-penny-stoc ...
Whenever I try to submit my form, I keep encountering this error message. Can anyone offer some assistance with this issue? Error: Parse error: syntax error, unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/u378761662/ ...
While following a tutorial on updating a database with ajax, I encountered a situation where the tutorial wanted to create a new row for each update, but I needed to update an existing row instead. I managed to modify the code to suit my requirements, but ...
Can a program output results from five different databases that serve as the source of data? Thank you. ...
My current project involves creating a CRM app, and to do this, I have set up a database on my Raspberry Pi. Using PHP, I generated JSON results accessible through a URL. I've also developed a Network Manager in Swift for this project. However, I kee ...
Hey there, good morning! I'm currently working on gathering car data from this website: My process involves sending a request through the search bar on the homepage for a specific location and date. This generates a page like this: From there, I use the ...
I've been working on a new blog database design and I'm looking to conduct some tests within web2py's administrative interface. First step was creating a new web2py application named newblog through the admin interface. After that, I craft ...
I have a table stored in the database with the following structure and data: https://i.stack.imgur.com/Lmy9D.png I am looking to extract the JSON tree data from this table using Java: [ { "id":"null", "text":"Text1", "ch ...
Seeking assistance as I navigate my way through PHP and hope to find a solution for submitting multiple checkbox values into a database. Currently, I have successfully displayed checkboxes as checked if the corresponding value in the database is 1; otherwi ...
When I first started using MongoDB, I was able to successfully connect. However, when I tried to execute a basic query like: db.users.find() I encountered an error message saying TypeError: Cannot read property 'find' of undefined, indicating that I cann ...
When running the code snippet below, I am getting the following output: var db = new sqlite3.Database("database.sqlite") console.log("2") db.each("SELECT * FROM gban WHERE id = '"+id+"'", async function(err, ...
I've primarily focused on frontend development, but recently I've ventured into backend development with Node.js and Mongoose. My current project involves creating a user in the database, generating an email token, and sending an email all within ...
I am not very proficient in English, so I appreciate your understanding. As a beginner in the programming field, my current project involves creating an Accommodation Booking website. My plan is to develop a Booking System on my own server along with a d ...
Let's get straight to the point. Before anything else, I want to say THANKS IN ADVANCE. So, here's what's happening: When I submit the form I created, it goes through the submission process and all, but then it redirects the page to the PHP ...
I am currently searching for a specific item using the following code: Product.find({ category: "bracelet" }); In one scenario, I need to find items with any category value or simply search for all items like this: let cat; if (req.body.cat) ...
I am attempting to create my own database using JavaScript and JSON, but I have encountered some issues along the way. My main struggle is figuring out how to extract specific content from a JSON file. After doing some research, I came across this code sn ...
As a newcomer to this game, I am curious to know if it's feasible to store the following object in a single column within an SQL database like postgres: { "foo1": ["bar1", "bar2"], "foo2": ["bar1 ...
How can I allow users to update their profile information displayed in input fields pulled from the database? Controller.php // Display user details in input field Public function userDetails() { $id = auth()->id; $details = Users::where('id', ...
Currently, I am working on a basic android application that includes an activity dedicated to showcasing data extracted from a few tables in an online mySQL database. These tables are fairly straightforward and will not exceed 100 rows. In order for the a ...
I am currently developing an Express app that involves transferring data from views to a database. However, the majority of the data needs to be linked to other data within different tables in the database. For instance, there is a "choose student name" d ...
Currently, I am working on a project that involves using Alfresco. One of the new requirements for this project is to retrieve a sequence number from our Oracle database and populate a custom property within an Alfresco space. var conObj = new ActiveXObje ...
I'm trying to create a nested array using Laravel Eloquent from a basic table structure, but I'm having trouble figuring it out. Here's an overview of my table: https://i.stack.imgur.com/mH5vA.png and here is the desired array format I am ...
Looking for a way to merge two collections into one while ensuring that duplicates aren't included in the final result. Any suggestions on how to achieve this? I've heard about aggregation and map reduce methods, but I'm not sure which one i ...
I am working with two pandas dataframes, df1 and df2: df1: df2: item_name item_cleaned abc xyz Def xuy DEF Ghi s GHI lsoe Abc p ABc ois To solve my problem, I need to create a function that can compare the valu ...
Looking to extract and store JSONP data in a database using Ruby or Ruby on Rails? Here's the scenario: Let's assume you have a JSONP URL like, This JSON format isn't typical, so how can you parse it in Ruby/Ruby on Rails and then save the extracted data ...
After submitting a form, text entered into a text area is being saved to my database. However, in one instance, certain characters such as • are appearing in the field. For example: • Text When retrieving the data from the database using Jav ...
My select query is providing data in the following format: [{ id: 'CB2FD8B7-7E6D-4BF3-8E73-70D41FFBE456', products: '[{"product_id":"22061DA1-5D64-475A-B36A-140ECFE8D6B7"}]', falconpay_api_response: null, dhl_updated_by: null }, ... ] My current ...
Recently, I completed a module on data visualization, where I learned how to transform Google Spreadsheets into JSON using jQuery. In my spreadsheet, there are two simple columns: date and status (collected data about myself for practice in visualizing it ...
I am facing an issue with a function that I have written in PHP mySQL to insert records into a database. The function accepts an array of JSON data, a field name, a connection, and a DB name as parameters. It then constructs a SQL statement to insert the r ...
I'm currently grappling with a database logic issue. I need to create a system where users can create events, performances, and various ticket types for each event. These details will be stored in the database along with corresponding prices for the ...
I am currently developing a layered navigation module for my Laravel application, inspired by the functionalities found in Magento or WooCommerce. The main concept of this module is that products can have single or multiple attributes assigned to them, all ...
My PHP code snippet is displayed below: AjaxServer.php include '../include/connection.php'; // Check for the prediction if(isset($_POST["delete_me"]) && $_POST["delete_me"]=="true"){ $id = $_POST["id"]; $table = $_POST["table"]; $que ...
I am currently utilizing deepdiff to compare data from two different databases. Here's an example: from deepdiff import DeepDiff users1 = [{'id': 1, 'name': 'John', 'age': 30}, {'id': 2, 'name': 'Jane', 'age': 25}] users2 = [{'id': 1, 'name': 'John', 'age' ...
I'm struggling to get these items to appear horizontally (side by side) instead of vertically on my webpage. They are linked to a database, hence the PHP code included here. If you need more information, please feel free to ask. body { font: no ...
I have implemented the following code snippet to create a unique ID. The first half of the code generates a longer unique ID, which is then used as a parameter in the second piece of code that creates a shorter unique ID. Can I be certain that this approac ...
My application needs to be automated. It should first enter the username and password automatically, then click the login button. Next, it needs to retrieve a static OTP code from the database and input it into the OTP text field so the user can access ...
When using Laravel, I am familiar with establishing a relationship between the child and parent tables. This allows me to easily determine how many times the parent is utilizing the child. In Laravel, I can achieve this by accessing the ID of the parent t ...
Is there a way to efficiently convert the inspection_date field in my database from string to date for all objects, similar to the structure below? {"name": "$1 STORE", "address": "5573 ROSEMEAD BLVD", "city": "TEMPLE CITY", "zipcode": "91780", "state": "C ...
I'm in the process of developing an ecommerce webshop, utilizing express for my backend and the Prisma ORM. While the system is functional, I believe there is room for optimization, particularly in how I handle types and utilize Prisma as this is my first ...
As a newcomer to web backend development, I am currently delving into Node.js and Express. I am eager to learn how to implement both login/register functionality and database CRUD operations in the same project using MVC architecture. Most of the tutorial ...
When attempting to modify data in the database for a specific user column, I encountered an issue. The code that I created only alters the data for the last user in the database, rather than the current user. For instance: Let's say I am logged in as ...
Looking for a way to treat csv files as database tables without having to manually transform them? It would be great to have a command line option similar to how grep, head, tail, sort, and awk are used. For instance, the ability to select a specific colu ...
I need to determine the count of buildings per city in my documents. In this particular document, one of the cities mentioned is Kentucky, with a total of 6 cities in the document. However, when I use doc._id, it returns the ID but when I use doc.city, it ...
I am looking to insert a large amount of data into mongoDB using the following code snippet: const data = [{user : "1",password: "1"}, {user : "2",password: "2"}, {user : "3",password: "3"}, // up ...
Recently set up a Redis server for my backend using ioredis. I've discovered that if I want to store data in JSON format, I need to use the redisJSON module because hashes are only string typed and flat. However, since I'm only storing one objec ...
Currently encountering some challenges with the loading speed of a ModX Revolution (2.2.2-pl) setup. My suspicion is that the issue stems from having hundreds of websites hosted and accessible within the same administrator window, although I have no contro ...
After hours of coding, I'm stuck on a simple task and could really use some assistance. The "users" object contains user account information, with the function "get" meant to retrieve matching objects from this array. var users = [ { name:"xym ...
Currently, my team and I are collaborating on a Rails side project that involves loading a substantial amount of seed data. This data is stored in a JSON document with nearly 3200 JSON objects, each having the same three field names. After parsing and see ...
I'm facing a challenge trying to upload 2 files into a folder and save their names and image paths in a database. Below is my HTML code for reference: <input class="field2" type="file" name="file[]" multiple="multiple" /> Here is the PHP code I am ...
I'm in search of a database solution that can meet the following requirements: Store flat, random JSON structures separated by table names (e.g. random_json_table_1, random_json_table_2). Handle a high volume of insert operations (over 10,000 per se ...
I am seeking ways to increase the views on my website using only my Mac computer. I am open to all suggestions and options available. If necessary, I can provide more details to clarify my question further. Initially, I am aiming for a rise in basic hits ...
I am currently facing a dilemma with a Typo3 website for a customer, as it is hosted on a webserver with strict database user policies. I am trying to create a development site by duplicating the original site's database, but I am unable to do so due to re ...
click here for image encountered this issue in my MERN project. The code seems to work intermittently, with this error popping up at times. I've tried several solutions without success. The MongoDB database connection is fine, although it does take some ti ...
Can someone help me with populating one dropdownlist from another dropdownlist to filter the data? I tried using a scriptmanager but encountered an error: The control with ID '' requires a ScriptManager on the page. The ScriptManager must appear before ...
I need to find a way to export data from a database table into a single JSON file. Currently, when I run the code provided below, it splits the data rows into multiple files instead of creating one single file. This is the Camel's route: public void con ...
I need to perform an update on a table named stock where the product_id matches the product_id of another table called stock_in_temp, and also ensure that a column named crm_product_id is either null or ''. This task needs to be done using python sqlite3. ...
I have a question about adding multiple foreign keys to an object. Specifically, I have a scenario with Complaints that involve 2 Transports. One is used to track goods being sent back, and the other is used for goods being resent to the customer. @Table({ ...
I have a main collection named Categories which contains another collection called Subcategories. The Categories collection includes an array of subcategory IDs from the Subcategories collection. Here is the structure of my documents: Categories collectio ...
I have encountered a challenge in setting up a trigger in mysql to automatically populate a new table (customers) whenever another table (wp_usermeta) is populated. Although I am aware that this may not be considered the best design practice, my situation ...
I'm currently working on a website form that pulls information from a MongoDB database, similar to accessing a library catalog. My stack includes NodeJS, Express, MongoDB, and EJS views. While the code is functioning properly overall, I want to imple ...
I am currently developing an Android app where users will input text, and I need to store that data in an online database for later retrieval. I have a LAMP server set up online that I can utilize. Could someone guide me on how to connect Java with PHP an ...
I have 40 lacks IP ranges like shown in the image below and I need to find details for IPs within those ranges. How can I efficiently achieve this within a 5ms timeframe? Which database should I use to store and query the data? I have tried various metho ...