forumnz Posted January 29, 2008 Share Posted January 29, 2008 My code won't insert into the DB. Here is the snippet: <?php mysql_query("INSERT INTO fflists (name, email, business_name, keywords, url, murl, c1, c2, c3 ,c4 ,c5, dcr, add1, add2, add3, add4, map, openhrs, prk_os, prk_ofs, prk_pos, p_pofs, dbld, pay_chk, pay_eft, pay_visa, pay_amex, pay_mstr, pay_dnrs, pay_cash, f_busdin, f_chldmen, f_conf, f_glutfree, f_view, f_livmus, f_cat, f_chldplay, f_prvdin, f_prvfunc, f_prvpart, f_rmtdin, f_wedfnc, seatcap, goodkids, reserv, deliver, takeaway, otdrseat, dresc, liqul) VALUES ('$name','$email','$bname','$keywords','$url','$murl','$c1','$c2','$c3','$c4','$c5','$dcr','$add1','$add2','$add3','$add4','$map','$opnhrs','$pos','$pofs','$ppos','$ppofs','$dbld','$cheque','$eft','$visa','$amex','$mstr','$dnrs','$cash','$busdin','$chldmen','$conf','$glutfree','$views','$livmus','$cat','$chldplay','$prvdin','$prvfunc','$prvpart','$rmtdin','$wedfnc','$seatcap','$goodkids','$reserve','$takeaway','$otdrseat','$dresc','$liqul')"); ?> Thanks for your help. Sam. Quote Link to comment https://forums.phpfreaks.com/topic/88446-solved-insert-problem/ Share on other sites More sharing options...
rlindauer Posted January 29, 2008 Share Posted January 29, 2008 What's the error it gives you? Quote Link to comment https://forums.phpfreaks.com/topic/88446-solved-insert-problem/#findComment-452668 Share on other sites More sharing options...
craygo Posted January 29, 2008 Share Posted January 29, 2008 change to mysql_query("INSERT INTO fflists (name, email, business_name, keywords, url, murl, c1, c2, c3 ,c4 ,c5, dcr, add1, add2, add3, add4, map, openhrs, prk_os, prk_ofs, prk_pos, p_pofs, dbld, pay_chk, pay_eft, pay_visa, pay_amex, pay_mstr, pay_dnrs, pay_cash, f_busdin, f_chldmen, f_conf, f_glutfree, f_view, f_livmus, f_cat, f_chldplay, f_prvdin, f_prvfunc, f_prvpart, f_rmtdin, f_wedfnc, seatcap, goodkids, reserv, deliver, takeaway, otdrseat, dresc, liqul) VALUES ('$name','$email','$bname','$keywords','$url','$murl','$c1','$c2','$c3','$c4','$c5','$dcr','$add1','$add2','$add3','$add4','$map','$opnhrs','$pos','$pofs','$ppos','$ppofs','$dbld','$cheque','$eft','$visa','$amex','$mstr','$dnrs','$cash','$busdin','$chldmen','$conf','$glutfree','$views','$livmus','$cat','$chldplay','$prvdin','$prvfunc','$prvpart','$rmtdin','$wedfnc','$seatcap','$goodkids','$reserve','$takeaway','$otdrseat','$dresc','$liqul')") or die(mysql_error()); And give us the error Ray Quote Link to comment https://forums.phpfreaks.com/topic/88446-solved-insert-problem/#findComment-452675 Share on other sites More sharing options...
forumnz Posted January 29, 2008 Author Share Posted January 29, 2008 Ok I did that but it just returns a blank page. Its not in the database - I checked it. What could be causing this? Quote Link to comment https://forums.phpfreaks.com/topic/88446-solved-insert-problem/#findComment-452677 Share on other sites More sharing options...
forumnz Posted January 29, 2008 Author Share Posted January 29, 2008 Sorry, it returns Column count doesn't match value count at row 1 Quote Link to comment https://forums.phpfreaks.com/topic/88446-solved-insert-problem/#findComment-452679 Share on other sites More sharing options...
revraz Posted January 29, 2008 Share Posted January 29, 2008 Means you have more columns that you do values. Quote Link to comment https://forums.phpfreaks.com/topic/88446-solved-insert-problem/#findComment-452681 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.