Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Junior Member Famous's Avatar
    Join Date
    Jun 2007
    Posts
    27
    Member #
    15431
    PHP Code:
    $insert "INSERT INTO story_lists (story_id, user_id, title, synopsis, short_story, age_rating, genre, keywords, rating, date_added, last_updated) VALUES ('', '$loggedin_id', '$addstory_title', '$addstory_synopsis', '$addstory_short_story', '$addstory_age_rating', '$addstory_genre' '$addstory_keywords', '0', '$now', '$now')";

    $add_story mysql_query($insert) or die ( "Error. Contact Support quoting error message: ".mysql_error() ); 
    When I run this script I get the folliwing error: Column count doesn't match value count at row 1.
    I have searched on Google and all I can find is that not enough values are being inserted into the table, but as you can see there is the same number. I have checked and doubled checked spelling as well. I just can't see where the problem lies and it's driving me insane.
    Any thoughts?
    Thanks in advance.
    Fancy a read? Pixelfiction.co.uk

  2.  

  3. #2
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    You're missing a comma after $addstory_genre.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  4. #3
    Junior Member Famous's Avatar
    Join Date
    Jun 2007
    Posts
    27
    Member #
    15431
    Ah ha. I'm such a blind old fool. I knew it would be something simple.

    I guess when you look at something too much you can't see it anymore.

    Cheers
    Fancy a read? Pixelfiction.co.uk

  5. #4
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    PS, you might want to look into magic quotes.

  6. #5
    Junior Member Famous's Avatar
    Join Date
    Jun 2007
    Posts
    27
    Member #
    15431
    All the variables have already had addslashes() applied to them. Thanks anyway.
    Fancy a read? Pixelfiction.co.uk


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 08:23 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com