I have a database with different tables in order to store photos, users, reviews, ratings… I wanna validate that no one uses “bad words” (insults) in their photos’ title or description. So I decided to create a table called ‘inappropiatewords’ where all of these bad words will be stored and then I made the following trigger: But when I try
Tag: database
How to create a sequence in a specific format in postgresql?
I want to automatically generate an unique entity field in Postgresql in following format: “ССDDD” where “C” is a character and “D” is a digit. For example “FG1752” or “HK9273”. How can this be implemented? Answer here is one way in mysql : in postgresql: I’m producing a random number between 65 and 90 which are ascii code for A
How to regex match multiple items
I have a reviews table as follows: r_id comment 1 Weight cannot exceed 40 kg 2 You must not make the weight go over 31 k.g 3 Don’t excel above 94kg 4 Optimal weight is 45 kg 5 Don’t excel above 62 kg 6 Weight cannot exceed 7000g What I want to select is the weight a r_id’s cannot exceed.
How can i make this Complex query for SQL database
I have a database that looks like this: Player (UserId, Mail, Password, Username, LastLogin) Leaderboard (UserId*, Level, Kills, Deaths) Match (MatchId, HostId*, ServerIp, StartTime, Team1Points, Team2Points) MatchStats (UserId*, MatchId*, Kills, Deaths) Weapons (IdWeapon, Name, Damage, FireRate, ReloadTime, Range) Inventory(UserId*, WeaponType*, Skin) I need a query that selects the LastLogin of every Player that is dead more than 12 times (MatchStats.Deaths
phpPgAdmin: how to duplicate an exact table from one database to another
Just as the title says, I want to duplicate one table from a completely separate database in phpPgAdmin to another one. I have tried two ways but both did not work for me: Tried “Create table like” (database >> table >> create table like) this seems to can only duplicate a table within the database Tried export and import I
Highest Mark in each course with student name
I want to get the highest mark in each course with the title of that course and student name who toke that course exam. and i have these tables , first one students id name 1 Jhon Doe 2 Sarah Doe and Courses table id title 1 Math 2 history and i made a table for connecting students with courses
how can I join multiple columns on two table in sql
I have two table like below how can I get all the information in table test_info and the name of the buyer AND the name of seller from the test_user table in the same statement? would just give me a seller or buyer but i would like to get the result for both Answer You must join 2 copies of
Data from 2 tables is not displaying on the same page
I’m a newbie in PHP and mySQL, I’m currently working on a profile page where I will display the logged in user’s personal information from one table called users and also display the tours that they will book in the future from my website from this table: booking I’m fetching the data from users table with prepared statement which will
query to group remarks column with sum of other column in oracle
lets assume i have following table “marksheet”: Now I want it like this: I have tried this. Now, I want to add theory_remarks and practical_remarks as above (table2). Thank you for any help. Answer Assuming userid,subject,type is unique
Datatables don’t load content of database
I’m trying to load users from a table in my database using datatables(https://datatables.net/) but the page is not loading anything at all. I’m getting these errors when I open the console [1]: https://i.stack.imgur.com/ykNTL.png I loaded the js and css here in this order: [uncaught ReferenceError: jQuery is not defined at dataTables.bootstrap.min.js:5 at dataTables.bootstrap.min.js:5][1] /> Answer if the page is not