Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6904725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:05:48+00:00 2026-05-27T08:05:48+00:00

CREATETABLE t_cust_acct ( o_id INT NOT NULL AUTO_INCREMENT, o_user VARCHAR(12) NOT NULL, o_pass VARCHAR(12)

  • 0
CREATETABLE t_cust_acct (
o_id INT NOT NULL AUTO_INCREMENT,
o_user VARCHAR(12) NOT NULL,
o_pass VARCHAR(12) NOT NULL,
o_mail VARCHAR(255) NOT NULL,
c_0 INT(2) NOT NULL,
c_1 INT(1) NOT NULL,
c_2 INT(1) NOT NULL,
c_3 INT(1) NOT NULL,
c_4 INT(1) NOT NULL,
 PRIMARY KEY ( o_id ),
 UNIQUE (
o_user
),
 CONSTRAINT c_validate CHECK (
c_0 = ( c_1 + c_2 + c_3 + c_4 ) 
))

So for example all field names starting with c_ are meant to be covert and have no representative fields on a HTML form; The form feedback page will generate four random numbers between -9 and 9 on the PHP server and then set the fields c_1 c_2 c_3 and c_4; c_0 will be the sum of these four numbers so that the insert doesn’t fail due to the c_validate constraint.

Will this work as intended?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T08:05:48+00:00Added an answer on May 27, 2026 at 8:05 am

    Apart from the fact that CHECK constraints are not executed in MySQL, why not just parametrise? And do it properly…

    • How can I prevent SQL injection in PHP?
    • php sql injection
    • … and many others on this site alone
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

create table ImagenesUsuario { idImagen int primary key not null IDENTITY } This doesn't
Given the table create table t ( t_id int not null primary key, c
Say i have the following table: create table T ( ID int not null
create table person ( name varchar(15), attr1 varchar(15), attr2 varchar(1), attr3 char(1), attr4 int
In the below SQL code is 'NOT NULL' redundant since f_ID is a primary
CREATE TABLE #t(LocationCode varchar(10), ResourceId int, TransType char(3)) INSERT #t SELECT 'STORE 001', 1,
The following T/SQL:- create table #temp(foo varchar(10)) insert into #temp select '' insert into
Considering this table: create table t (EventId int ,Section int ,PlayerName nvarchar(50) ,Score int
Table layout: CREATE TABLE t_order (id INT, custId INT, order DATE) I'm looking for
Let's say I have a table like this: CREATE TABLE t( [guid] [uniqueidentifier] NOT

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.