{ "TaskType": "kkkk", "Status": "SUCCESS", "jobID": "18056", "DownloadFilePath": "https://abcd", "accountId": "1234", "customerId": &q ...
Currently working on setting up an Express API server to fetch data for a portfolio website. I've configured the MySQL table with a JSON data type for the 'images' column, which is supposed to contain multiple image links for a gallery. However, when retri ...
I have created a visually appealing table to showcase data in the following manner: ID name Delete 1 abc Delete 2 def Delete The coding snippet used for the aforementioned display is as follows: <?php $con=mysqli_connect("abc" ...
I've hit a roadblock in my project. I'm currently working on an event registration system where a user selects an event from a dropdown menu populated by values and IDs retrieved from a SQL stored procedure (index.php). Upon selecting an event, I ...
I am facing a challenge with a string object stored in a table column, having the following structure: [{"__food": "true"},{"item": "1"},{"toppings": "true"},{"__discount_amount": " ...
I am working with a database that consists of 3 tables: Categories, Subcategories, and Articles. Within my Articles table, I have columns labeled CategoryID and SubcategoryID, both of which are foreign keys referencing the Categories and Subcategories tabl ...
I am currently working with 2 queries that are extracting elements from 2 separate databases. My goal is to combine the results of both queries into a single array. Right now, I have one array return, but I want to merge the data from these 2 queries into ...
Currently, I am in the process of developing a basic full-stack application that utilizes Gatsby for the front-end and a simple Express server for the backend. Within my database, there are several users, and my objective is to fetch these users from the b ...
My latest project involves creating a basic CMS for a website. This is my first time working with MySQL and one of my early experiences with PHP, so I see it as a learning opportunity. Despite consulting numerous resources, the code I've written only resul ...
I'm attempting to extract the JSON message below using SQL: { "document": { "Invoice": { "_NavRecordId": "Purch. Inv. Header: 06IF+230033", "InvoiceNumber": "06 ...
Is it feasible to integrate PHP data into a MySQL result? Let me elaborate: Consider two tables, one containing user actions and the other user information. By querying the actions table, I retrieve user IDs and count each one grouped by the user: $ids = ...
I am in the process of setting up Presto and Redis on my local machine using the instructions provided in the Presto-Redis Documentation. Problem Overview: When I set redis.key-prefix-schema-table=true and use the prefix dev:simple_table: for a Redis key ...
I recently added a plugin called "SQL Inject Me" to my Firefox browser and decided to test it on my Cakephp website. To my surprise, the plugin was able to inject several blank user accounts, some with passwords and some without. This is strange because I ...
Recently, I discovered an interesting Firefox addon called 'SQL Inject Me'. To satisfy my curiosity, I decided to test it on a simple phonebook intranet site that has an admin account. The test results showed 51 #302 errors, but despite trying them out, I ...
There are single quotes being used in $bio = "$user->description"; when inserting into the database like this; <? $sql = "insert into yyy (id, twitterid, twitterkullanici, tweetsayisi, takipettigi, takipeden, nerden, bio, profilresmi, ismi) values ...
As I work on a slideshow, my goal is to dynamically change the HTML class attribute from "item" to "item active" when the first record is fetched from the database. For all subsequent records, the class should revert back to just "item." $RelatedTo=1; $ ...
Currently, I am attempting to send a JSON payload to SQL in order to import a specific column. Within the JSON data, there is a segment structured like this: "Custom":[ {"id":100, "value" 8 }, {"id":200, ...
I am facing an issue with inserting a NULL value into a column named price, which is of type Decimal. The "price" column is nullable and has a default value of NULL. My goal is to insert NULL only when the "price" input field in an HTML form is left empty ...
Back with another question! I'm struggling to make a download query function properly. The issue is that instead of actually downloading the uploaded file, it just creates a "download.php" file and downloads that to the default folder, without giving ...
How can I effectively utilize the knex db object across multiple files? As an illustration In my main index.js file: const app = require("express")(); const cors = require("cors"); const bodyParser = require("body-parser"); const user = require("./route ...
Currently developing a web application for a project and I have a query: I am trying to use the insert command, however, I need to insert different data in two separate tables. One table is for users and another is for scheduling appointments. Do I need ...
I have a project in mind where users can like each other's photos, and if the feeling is mutual, they become a match. It's similar to the concept of the Tinder app. Currently, I am retrieving one photo using the following query: SELECT id, pict ...
I have a column in my database that stores the top gaining athletes on my fantasy sports website. I want to make each athlete's name a clickable link that directs users to their individual page on our site. Currently, the function in the code is calli ...
How can I create a SQL select query with 3 levels of expressions and statements? Typically, my website operates on an SQLite database and the search results are displayed using the following SQL query: "SELECT DISTINCT * FROM amz WHERE Title LIKE "$qq% ...
I have an unusual query that aims to retrieve all items from a parent table that do not have corresponding matches in its child table. If possible, I would like to convert this into an SQLAlchemy query. However, I am unsure of how to proceed as my experie ...
I currently have 3 tables in my database: user, wink, messages Despite laying out what I need, it seems like nobody is fully grasping the concept. SELECT wink.*, user.id, user.points, user.gender, user.firstname, user.email FROM wink INNER JOIN user O ...
I'm currently facing an issue with a table in my database where the field JSONDetail stores JSON data. The problem arose when we encountered unescaped double quotes within one of the values in this field, likely due to migrating from a system that allowed ...
When accessing a Sqlite3 table with Python, everything works smoothly except for a table column that contains an apostrophe in the value (e.g. George's). I have figured out the SQL query "SELECT * FROM table WHERE column1 = '" + value1 + "' and column2 = ...
I've been searching high and low for a solution to my issue, but so far, I haven't had any luck. Maybe someone here can help steer me in the right direction. I currently have a website that houses a vast amount of content within a MySQL databas ...
I am currently working with an array of customer objects that I need to insert into a SQL database. These customer objects are retrieved from the request data. For this task, I am utilizing Tedious for handling the request and Tedious Connectionpool to ma ...
After executing the following SQL Server query, I successfully created a JSON object: SELECT Attribute 1, Attribute 2, Attribute 3,... AS Identifier FROM Table_1 tbl1_obj INNER JOIN Table_2 tbl2_obj ON tbl2_obj.Id = tbl1_obj.Id FOR JSON AU ...
As an illustration, An example of a table id name 1 abc 2 def I am familiar with using "select * from sample For JSON auto" in SQL Server to retrieve records and output them in JSON format. Is there a similar functionality available in Redshift? Here ...
Hey everyone, I'm facing a specific issue on my website that I haven't been able to solve by searching online. Therefore, I decided to create this question myself. What I'm trying to achieve: When I click a button on my site, it triggers a ...
Hey there, I'm currently working with a SQL database that stores property information. I have set up a search button to look for properties based on the propertyLocation field. For example: Property ID 1, 5 Bedroom House, London Property ID 2, 3 Bedroom ...
Within my MySQL table, I have the following data: user | open | date --------------------------------- User1 | 1 | 2017-05-19 User2 | 1 | 2017-05-19 User3 | 1 | 2017-05-19 User4 | 1 | 2017-05 ...
Is there a way to dynamically generate a Doctrine ORM query that mimics the following SQL statement, considering that the number of values in the 'OR' clause may vary with each execution? SELECT * FROM table1 WHERE table1.group = 1 OR 2 OR 3 For in ...
My PHP update page allows me to modify a website's database that contains YouTube embed codes. However, when I try to edit the embed code on the update page, only "<iframe width=" displays instead of the complete original code. <html> <? ...
Is there a way to automatically populate the related id/name of multiple check boxes in an un-editable text box or text field? I am expanding and clarifying one of the suggestions... I have several checkboxes that I want to save into the SAME database fi ...
I am trying to determine if a record exists: $query = "SELECT * FROM `collegeInfo` WHERE `name` = '$name' "; $existed = mysqli_query($con, $query); echo mysql_num_rows($existed); The third line is causing an error: 500 - Internal server erro ...
I am currently managing a local postgres database. The challenge I am facing involves an array that looks like this: [1,2,3,...2600] Because the array is extremely long, manually typing out each element for insertion is not a practical option. That' ...
Recently, I developed a PHP script for my site that facilitates user registration and login specifically for membership purposes. If a user successfully logs in, the script redirects them to a landing page for members. However, if the login fails, the scri ...
I'm having trouble with this query on the server, but it works fine in Phpmyadmin on my local host : SELECT * FROM op_theme_certification AS t INNER JOIN op_category_module AS c ON t.cat_mod_id = c.cat_mod_id, (SELECT cat_mod_id, MAX(date_expiration) A ...
Currently, I am exploring the functionalities of Django. In my models.py file: class I(models.Model): pic = models.FileField(#upload image) class Pl(models.Model): user=models.ForeignKey(User) picture = models.ForeignKey(I) Now, let's ...
My understanding of SQL's locking mechanism has been challenged recently. I know there are shared and exclusive locks, and that multiple shared locks can be applied to the same data simultaneously. However, I am confused as to why query 1 does not block qu ...
I'm attempting to fetch multiple rows using the SQL Server 2017 TSQL code from a JSON object. DECLARE @json NVARCHAR(MAX); SET @json = N'{ "DateCreated": "2020-08-02T16:04:59.3558001+01:00", "Name": "Bolts", &q ...
I have the SQL Table 1 shown below: id name gender age country ambition 1 Peter Male 20 Italy Doctor 2 Angeli Female 30 Australia Lawyer I need to insert data into another table using a similar approach. Here is how I want the output in SQL Tabl ...
I am facing an issue where the length of a string calculated using Sql Server (LEN) and jQuery ($(this).val().length) is different. The content of the string in question is as follows: 'Project Noida Ka-Rate Gr. Noida Ka AJNARA AMBROSIA-Sec. 118 ...
Wondering if Python Flask can maintain data consistency when creating a table based on MySQL query results without reloading in the browser every time I refresh. Can Flask handle this task efficiently? from flask import Flask, render_template import mysql ...
As I work on creating a website, I have incorporated a database that allows users to input data in the form of votes. To enhance user experience, I want to display a counter in the header showing the total number of votes cast so far. However, considering ...
I have a question: Within my database, there are 2 tables: articles: id useid title users id name surname In my view: Author<select name="author" id="author"> <?php foreach ($users as $u): ?> ...
Table A contains a column b which stores data in JSONB format b ------------------ {"c": 1} {"c": 1, "d": 2} How can I create a query to retrieve rows where the key 'd' is missing? SELECT * FROM A WHERE b@>'{"c":1}'; The above query will r ...
I am working with a MySQL database table that has 4 columns labeled a, b, c, and d. My goal is to select the unique values from all four of these columns in my table. Below is a sample representation of my table: a b c d -------------------------- 1 ...
While executing the code below on Oracle 12c : DECLARE l_json clob; l_var varchar2(90); l_query clob; mypath clob; l_path_value varchar2(100); BEGIN SELECT json_column into l_json from my_table; SELECT path_colum ...
I'm currently working on an application that stores doctor appointments on a weekday basis. To manage this, we have a schedule table and a calendar table that stores the dates. Below is a snapshot of the schedule table: https://i.stack.imgur.com/OPRPb ...
Apologies for the inconvenience, but I am spending too much time on this: My SQL query is returning the table as expected, but unfortunately I can't seem to display the result on the table. This is my SQL code: $ssql = "SELECT * FROM tickets JOIN (SELECT ...
Seeking assistance with TypeORM and the @JoinTable and @RelationId Decorators. Any help answering my question, providing a hint, or ideally solving my issue would be greatly appreciated. I am utilizing NestJS with TypeORM to create a private API for shari ...
I am facing a challenge with JSON data being imported into my MariaDB/MYSQL database using Airbyte from an API query. I have been using JSON_TABLE to extract the JSON into columns, which has been working quite well. However, I recently noticed that there i ...
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 ...
I am working on a controller code: public function getChartData(){ $result["categories"] = array(); $result["series"] = array(); $sales = $this->db->Execute("select id_tenant, nama_kantin, count(id_penjualan) as jumlah_penjualan, s ...
When running a presto command, I received the following result: a| b| c --+--+------ 1 | 3| 6 2 | 4| 5 I am aware of cursor.fetchall() to retrieve all data and cursor.fetchone() for a single row. Now, I am interested in extracting data from a sp ...
I am working with 2 tables, physical-assessment-exercise and physical-assessment-lesson. In the file psysical-assessment-lesson.model.js: const Sequelize = require('sequelize'); const DataTypes = Sequelize.DataTypes; module.exports = function ( ...
Utilizing API calls to retrieve data for the frontend is essential, but with a database table containing 250,000 rows, efficiency becomes a concern. In my .NET Core application, I implement the following query: IQueryable<Message> query = context.Me ...
Having successfully connected to sqlserver using ODBC in php, I am able to establish a connection with the database and execute queries. However, the results I receive are not as expected. A notice is being displayed: server connected Notice: Use of un ...
I have thoroughly examined the available options discussed in this context, but I find that most of them do not adequately address my specific situation. In my scenario, I import this information into a database where the field is designated as SMALLINT. H ...
I have a CSV file with timestamps in this specific format: timestamp, day_chan2, day_chan3 01/02/2014 00:00, 9, 2 01/02/2014 00:00, 16, 5 My goal is to import this data into a MySQL database using the LOAD DATA I ...
Can a program output results from five different databases that serve as the source of data? Thank you. ...
I am looking to enhance my select query by incorporating filter and search values. Users should have the flexibility to search, filter, or do both simultaneously. Here are some scenarios: Success: Search only. select name, id from master.contact where na ...
There are two tables: admin and news The structure is as follows: admin ----- id name news ----- id createBy updateBy Currently, the createBy and updateBy fields store the admin id. I would like to retrieve the admin name of createBy and updateBy. How ...
In my cakephp application, there is a database table named users containing user data. Each user record includes the registration date stored in a field called date. I want to perform a find query that retrieves all users who registered last month. Here's ...
Can someone please assist me with this issue I'm encountering? I am attempting to create a table using the provided query, which functions correctly in phpMyAdmin but fails to work within my PHP script. If possible, could you kindly identify any errors in ...
Within my patient_display.php file, I am calling the patient_history.php script and passing along the P_ID. Here is an outline of my code. patient_display.php: echo '<form name="Patient" action="patient_history_display.php" method="get">'; ...
After reading through various threads on this issue, I still haven't found a solution that incorporates php variables. I am trying to retrieve the first 100 new records after a specific date from my database, but I'm struggling to make it work. ...
Assume we have a basic DB-table named tab set up in MySQL with the following structure: CREATE TABLE `tab` ( `id` int(11) NOT NULL AUTO_INCREMENT, `val` int(11) DEFAULT NULL, `altval` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ); The table is then popul ...
As a coding beginner, I've been tackling a project involving data insertion into an SQL server with PHP. My current struggle lies in the process of inserting data and capturing select tag objects as variables. I keep encountering Undefined Index error ...
I need help summarizing the total revenue for each day within a specific time period (e.g. 2020) by grouping orders based on a custom field called "pickup_date". Instead of showing revenue by individual dates, I would like to display it grouped by the "pic ...