Announcement

Collapse
No announcement yet.

Meaning of null, not null and primary pls.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Meaning of null, not null and primary pls.

    I would like to list links and business on www.ufindabiz.com.
    Currently the sql database will not allow listings without all fields filled in. How do I allow listings (entries) into my database without all current required fields.
    Does it have something to do with null, not null, or primary?
    I would like to offer listings that do not have to include address, phone number etc. But just allow http as links.

    Thanks
    www.reikiforhorses.ca
    Balance Your Horse's Energy For Self-Healing
    www.lucynixon.ca
    Reiki For Pets and Their People
    www.ufindahorse.com
    Work In Progress

  • #2
    Re: Meaning of null, not null and primary pls.

    The sql database doesn't limit what you can do, what script are you using to display the data?

    Register/Login Script
    Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

    Comment


    • #3
      Re: Meaning of null, not null and primary pls.

      Yikes, that's a nightmare in itself! I purchased a script template. I had spent about 3 months "tweeking" it. Had no idea what I was doing, so had to buy a few "dummies" books. I'll have to sign my life away, again!, and figure out which script to look into!

      I wish I had never bought a script!!! Should have waited until I knew what I was doing, or hired someone!!! See you in a year!!!!! Man!!
      www.reikiforhorses.ca
      Balance Your Horse's Energy For Self-Healing
      www.lucynixon.ca
      Reiki For Pets and Their People
      www.ufindahorse.com
      Work In Progress

      Comment


      • #4
        Re: Meaning of null, not null and primary pls.

        If the script you are using has set the fields to be NOT NULL by default, then MySQL will not accept a null entry.

        You can overcome this going in phpMyAdmin and changing the columns attributes to allow NULL.

        However, usually it should be the script to verify and check user input, not MySQL
        Navaldesign
        Logger Lite: Low Cost, Customizable, multifeatured Login script
        Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
        DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
        Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

        Comment


        • #5
          Re: Meaning of null, not null and primary pls.

          MySql shows *all* fields as "no" in the "null" column. I tried to change the CompanyName field to allow "null" and then it showed "yes" in "null" field and default2 at "Null". Does this make sense to anyone??? But then when I tested it on my site. I still got the pop up window saying "Enter Company Name please". And herein lies the problem. I don't know what script is causing that pop up window! Schmisters! I am not a happy camper.

          Oh, also the sql shows each field as primary and unique. But I can't seem to change that either.

          All this for wanting to offer all VH members a free link (without the restriction of having to list a company name, address, phone, etc)!!
          www.reikiforhorses.ca
          Balance Your Horse's Energy For Self-Healing
          www.lucynixon.ca
          Reiki For Pets and Their People
          www.ufindahorse.com
          Work In Progress

          Comment


          • #6
            Re: Meaning of null, not null and primary pls.

            Is is not MySQL that sends out this alert popup, but your own script. If you know how to edit the code, then you can allow null values, otherwise you need someone to do it for you.
            Navaldesign
            Logger Lite: Low Cost, Customizable, multifeatured Login script
            Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
            DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
            Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

            Comment


            • #7
              Re: Meaning of null, not null and primary pls.

              So back to script hunting, eh? Just need to find what script it's in.....Wonderful. Looking forward to it. (NOT!)
              Oh well, when I don't know, I learn, then the more I learn, the more I don't know! LOL
              www.reikiforhorses.ca
              Balance Your Horse's Energy For Self-Healing
              www.lucynixon.ca
              Reiki For Pets and Their People
              www.ufindahorse.com
              Work In Progress

              Comment


              • #8
                Re: Meaning of null, not null and primary pls.

                When I viewed the source code on the page, I get this:

                if(document.RegForm.CompanyName.value=="")
                {
                window.alert('Enter your company name, please!');
                document.RegForm.CompanyName.focus();
                return false;
                }

                for the example of the Company Name.
                So now I guess, I need to search somehow for the Reg.Form doc????
                www.reikiforhorses.ca
                Balance Your Horse's Energy For Self-Healing
                www.lucynixon.ca
                Reiki For Pets and Their People
                www.ufindahorse.com
                Work In Progress

                Comment


                • #9
                  Re: Meaning of null, not null and primary pls.

                  What you mean which script it is in ? just look at your browser, to see in which page you are, then open this page (i mean the file) and look if the Javascript is embedded or called from an external file, if it embedded, you can edit it right in the page code, if it is an external file, open that file (after you have spotted it, usually you will find the file call in the <head> tag of the main page and edit it.
                  Navaldesign
                  Logger Lite: Low Cost, Customizable, multifeatured Login script
                  Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                  DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                  Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                  Comment


                  • #10
                    Re: Meaning of null, not null and primary pls.

                    Originally posted by MoodyMare View Post
                    When I viewed the source code on the page, I get this:

                    if(document.RegForm.CompanyName.value=="")
                    {
                    window.alert('Enter your company name, please!');
                    document.RegForm.CompanyName.focus();
                    return false;
                    }

                    for the example of the Company Name.
                    So now I guess, I need to search somehow for the Reg.Form doc????

                    No, document.RegForm.CompanyName.value is the value that the user has typed in the "Company Name" field, as it is "captured" by Javascript. So, if you don't want to have the Company Name as required field, you need to delete this code. You should also delete similar code that makes required the other fields that you, instead, want optional. Ten save the code and upload it on the server.

                    You should better make a backup of the original script files, just in case....
                    Navaldesign
                    Logger Lite: Low Cost, Customizable, multifeatured Login script
                    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                    Comment


                    • #11
                      Re: Meaning of null, not null and primary pls.

                      Really feeling dumb now. How do I do a backup?
                      www.reikiforhorses.ca
                      Balance Your Horse's Energy For Self-Healing
                      www.lucynixon.ca
                      Reiki For Pets and Their People
                      www.ufindahorse.com
                      Work In Progress

                      Comment


                      • #12
                        Re: Meaning of null, not null and primary pls.

                        Sorry, I should mention to the above dumb question that www.ufindabiz.com was a purchased php script and not done up in bv. So the question still stands, how do I back up my site? (Sorry, I think it may be as easy as backing up on a cd, but don't know, never backed anything up before. I know *shame on me*!)
                        www.reikiforhorses.ca
                        Balance Your Horse's Energy For Self-Healing
                        www.lucynixon.ca
                        Reiki For Pets and Their People
                        www.ufindahorse.com
                        Work In Progress

                        Comment


                        • #13
                          Re: Meaning of null, not null and primary pls.

                          If this is purchased script, you have probably first downloaded the files in your computer, then you uploaded them on your site and installed the script. In this case, you already have the files on your computer, just back them up.

                          If the script was installed by the seller, you can download the files from the site to your computer, and store them safely, then work on a copy, so the original files are not changed.
                          Navaldesign
                          Logger Lite: Low Cost, Customizable, multifeatured Login script
                          Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                          DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                          Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                          Comment


                          • #14
                            Re: Meaning of null, not null and primary pls.

                            Yes, it was installed by the seller. I think I understand. I use the FTP to copy from site, to my pc???

                            Also, thanks for the info above, above.....(tee hee). I have found the php that is demanding the input of all fields when in register.php. I'll have a go at the download(backup). Then try to edit the php.

                            Wish me luck. You know, if I wasn't so stubborn (and trying to do it myself), I'd be broke!!!! LOL

                            But I must say, I could NOT have done ANY of this without good 'ole VH!!!!!

                            Cheers!
                            www.reikiforhorses.ca
                            Balance Your Horse's Energy For Self-Healing
                            www.lucynixon.ca
                            Reiki For Pets and Their People
                            www.ufindahorse.com
                            Work In Progress

                            Comment


                            • #15
                              Re: Meaning of null, not null and primary pls.

                              Would this be easier? Just remove the **onsubmit="return CheckRegister()** line in the form?

                              <form method=post action="register.php" enctype="multipart/form-data" name=RegForm onsubmit="return CheckRegister();">
                              <table align=center width=300>
                              www.reikiforhorses.ca
                              Balance Your Horse's Energy For Self-Healing
                              www.lucynixon.ca
                              Reiki For Pets and Their People
                              www.ufindahorse.com
                              Work In Progress

                              Comment

                              Working...
                              X