Jump to content

Variables Limits


user4fun

Recommended Posts

Apperently i just fgound out that 19 it the max number of variables to you write to an sql table??is that true, i guess it would be because i have 17 variables from a from that gets inserted into a mysql table and it does not work until i take one of them of down to 16.Any ideas of what i can do to overcome that.THANK YOU

Link to comment
Share on other sites

Hmmm.. I'm not sure about that because imagine all those huge php applications, I'm sure they must have more than 17 variables.Does it matter which variable you take out?

Link to comment
Share on other sites

here is my code, maybe i am missing something

<html><head>         <title>Untitled</title></head><body><?echo "your submitted information are as follows <br>"; echo "Status     :<b> $Status</b>";echo "Domain     :<b> $Domain</b><br>";echo "Title      :<b> $Title</b><br>";echo "First Name :<b> $Fname</b><br>";echo "Last Name  :<b> $Lname</b><br>";echo "Phone      :<b> $Phone</b><br>";echo "Ext        :<b> $Ext</b><br>";echo "Fax        :<b> $Fax</b><br>";echo "Address    :<b> $Address</b><br>";echo "City       :<b> $City</b><br>";echo "State      :<b> $State</b><br>";echo "ZipCode    :<b> $ZipCode</b><br>";echo "Email      :<b> $Email</b><br>";echo "Market Type:<b> $MarkType</b><br>";echo "Market Detail:<b> $MarkDetail</b><br>";echo "Start Date :<b> $StartDate</b><br>";echo "Renewel Date :<b> $RenewalDate</b><br>";echo "Additional Info:<b> $AddInfo</b><br>";   $link = mysql_connect("", "", "") or die ("Could Not Connect");// this works   mysql_select_db("Business") or die ("NO ACCESS");  // this works    $sql = "INSERT INTO Profile (BusinessID, Status, Domain, Title, Fname, Lname, Phone, Ext, Fax, Address, City, State, ZipCode, Email, MarkType, MarkDetail, Sdate, Rdate, AddInfo)VALUES ('', '$Status', '$Domain', '$Title', '$Fname', '$Lname', '$Phone', '$Ext', '$Fax ', '$Address', '$City', '$State', '$ZipCode', '$Email', '$MarkType', '$MarkDetail', '$StartDate' , '$RenewalDate', '$AddInfo')";$query=mysql_query($sql);if($query){    echo " it worked";}else{    echo " FAILED"; // THIS IS WHATI KEEP GETTING??}?> </body></html>

Link to comment
Share on other sites

Looks like you are getting serious, if I were you I would start using phpMyAdmin.Gives you a command line interface to your database.As far as your problem, do this query and post your results:

$sql = "show create table Profile";

Also post the sample data that you are trying to insert into the table.I see that you've checked the fields by posting them on the page, they all posted properly to the page?That is alot of information, are you using post as your form method?-hs

Link to comment
Share on other sites

Should be no problem then for you to let us know what error is generated from your query. That's the great thing about phpMyAdmin :)Your code works fine for a table that is created like so:

CREATE TABLE `w3test` (`BusinessID` int(6) unsigned NOT NULL AUTO_INCREMENT ,`Status` varchar(25) NOT NULL,`Domain` varchar(25) NOT NULL,`Title` varchar(25) NOT NULL,`Fname` varchar(25) NOT NULL,`Lname` varchar(25) NOT NULL,`Phone` varchar(25) NOT NULL,`Ext` varchar(25) NOT NULL,`Fax` varchar(25) NOT NULL,`Address` varchar(25) NOT NULL,`City` varchar(25) NOT NULL,`State` varchar(25) NOT NULL,`ZipCode` varchar(25) NOT NULL,`Email` varchar(25) NOT NULL,`MarkType` varchar(25) NOT NULL,`MarkDetail` varchar(25) NOT NULL,`Sdate` varchar(25) NOT NULL,`Rdate` varchar(25) NOT NULL,`AddInfo` varchar(25) NOT NULL,PRIMARY KEY ( `BusinessID` )) TYPE = MYISAM 

And then you also have to make a plan to deal with characters that need escaping.. :) -hs

Edited by hacknsack
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...