Web Hosting Vodahost    

Home Take The Royal Tour! Order Now Features Prices
Go Back   Web Hosting > VodaHost Web Hosting Support > mySQL & PHP

Notices

mySQL & PHP Discussions, information and help with mySQL and PHP.

Reply
 
LinkBack Thread Tools
  #1  
Old 02-14-2008, 05:55 PM
MoodyMare's Avatar
Second Lieutenant
 
Join Date: Aug 2007
Location: Ontario, Canada
Posts: 121
Default 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.UFindABiz.com
World Wide Web-based Business Directory
www.reikiforhorses.ca
Balance Your Horse's Energy For Self-Healing
www.lucynixon.ca
Reiki For Pets and Their People
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2  
Old 02-14-2008, 06:28 PM
Watdaflip's Avatar
Brigadier General
 
Join Date: Sep 2005
Location: Cincinnati, Ohio
Posts: 1,638
Default 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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old 02-14-2008, 06:34 PM
MoodyMare's Avatar
Second Lieutenant
 
Join Date: Aug 2007
Location: Ontario, Canada
Posts: 121
Default 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.UFindABiz.com
World Wide Web-based Business Directory
www.reikiforhorses.ca
Balance Your Horse's Energy For Self-Healing
www.lucynixon.ca
Reiki For Pets and Their People
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old 02-14-2008, 06:34 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 9,346
Default 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!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old 02-14-2008, 06:41 PM
MoodyMare's Avatar
Second Lieutenant
 
Join Date: Aug 2007
Location: Ontario, Canada
Posts: 121
Default 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.UFindABiz.com
World Wide Web-based Business Directory
www.reikiforhorses.ca
Balance Your Horse's Energy For Self-Healing
www.lucynixon.ca
Reiki For Pets and Their People
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old 02-14-2008, 06:48 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 9,346
Default 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!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old 02-14-2008, 06:53 PM
MoodyMare's Avatar
Second Lieutenant
 
Join Date: Aug 2007
Location: Ontario, Canada
Posts: 121
Default 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.UFindABiz.com
World Wide Web-based Business Directory
www.reikiforhorses.ca
Balance Your Horse's Energy For Self-Healing
www.lucynixon.ca
Reiki For Pets and Their People
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old 02-14-2008, 07:00 PM
MoodyMare's Avatar
Second Lieutenant
 
Join Date: Aug 2007
Location: Ontario, Canada
Posts: 121
Default 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.UFindABiz.com
World Wide Web-based Business Directory
www.reikiforhorses.ca
Balance Your Horse's Energy For Self-Healing
www.lucynixon.ca
Reiki For Pets and Their People
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old 02-14-2008, 07:01 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 9,346
Default 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!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old 02-14-2008, 08:28 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 9,346
Default Re: Meaning of null, not null and primary pls.

Quote:
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!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #11  
Old 02-14-2008, 08:43 PM
MoodyMare's Avatar
Second Lieutenant
 
Join Date: Aug 2007
Location: Ontario, Canada
Posts: 121
Default Re: Meaning of null, not null and primary pls.

Really feeling dumb now. How do I do a backup?
__________________
www.UFindABiz.com
World Wide Web-based Business Directory
www.reikiforhorses.ca
Balance Your Horse's Energy For Self-Healing
www.lucynixon.ca
Reiki For Pets and Their People
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12  
Old 02-14-2008, 09:21 PM
MoodyMare's Avatar
Second Lieutenant
 
Join Date: Aug 2007
Location: Ontario, Canada
Posts: 121
Default 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.UFindABiz.com
World Wide Web-based Business Directory
www.reikiforhorses.ca
Balance Your Horse's Energy For Self-Healing
www.lucynixon.ca
Reiki For Pets and Their People
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #13  
Old 02-14-2008, 09:27 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 9,346
Default 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!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #14  
Old 02-14-2008, 09:30 PM
MoodyMare's Avatar
Second Lieutenant
 
Join Date: Aug 2007
Location: Ontario, Canada
Posts: 121
Default 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.UFindABiz.com
World Wide Web-based Business Directory
www.reikiforhorses.ca
Balance Your Horse's Energy For Self-Healing
www.lucynixon.ca
Reiki For Pets and Their People
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #15  
Old 02-14-2008, 09:57 PM
MoodyMare's Avatar
Second Lieutenant
 
Join Date: Aug 2007
Location: Ontario, Canada
Posts: 121
Default 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.UFindABiz.com
World Wide Web-based Business Directory
www.reikiforhorses.ca
Balance Your Horse's Energy For Self-Healing
www.lucynixon.ca
Reiki For Pets and Their People
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #16  
Old 02-14-2008, 11:30 PM
MoodyMare's Avatar
Second Lieutenant
 
Join Date: Aug 2007
Location: Ontario, Canada
Posts: 121
Default Re: Meaning of null, not null and primary pls.

Okay, update time....I found the script in my HeaderTemplate. I have changed it. I will post in the website thread, for anyone who would be so kind as to test it.

Once again, VH (and specifically NavalDesign) comes through for me. Thanks!
__________________
www.UFindABiz.com
World Wide Web-based Business Directory
www.reikiforhorses.ca
Balance Your Horse's Energy For Self-Healing
www.lucynixon.ca
Reiki For Pets and Their People
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Show Printable Version