SitePoint Sponsor

User Tag List

Page 3 of 3 FirstFirst 123
Results 51 to 55 of 55
  1. #51
    SitePoint Addict
    Join Date
    Jan 2006
    Posts
    221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    also what if a variable such as $error =
    has more than one result like an array would i have to define the variable in such a manner such as an array like this?
    $error = ARRAY('$error = blah blah' || 'error = blah blah blah');
    would that work?

  2. #52
    Worship the Krome kromey's Avatar
    Join Date
    Sep 2006
    Location
    Fairbanks, AK
    Posts
    1,621
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To your SQL error, ditch the parenthesis - that's invalid SQL syntax and likely what's causing your error. To your second question... maybe it's just because I'm tired, but I've no clue what you are asking.
    PHP questions? RTFM
    MySQL questions? RTFM

  3. #53
    SitePoint Addict
    Join Date
    Jan 2006
    Posts
    221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kromey
    To your SQL error, ditch the parenthesis - that's invalid SQL syntax and likely what's causing your error. To your second question... maybe it's just because I'm tired, but I've no clue what you are asking.
    i do not have parenthesis in my sqy query. I did like you said (ToMonth = '{$_POST['ToMonth']}')

    error:You have an error in your SQL syntax near '(Weight = '80-90 Lbs'), (city = 'farmingville'' at line 5

    PHP Code:
            $q1 "UPDATE d_s_listings set
                                            CategoryID = '
    $CategoryID',
                                            SubcategoryID = '
    $SubcategoryID',
                                            SubcategoryName = '
    $SubcategoryName',
                                            (Weight = '
    {$_POST['Weight']}'),
                                            (city = '
    {$_POST['city']}'),
                                            (state = '
    {$_POST['state']}'),
                                            (oneliner = '
    {$_POST['oneliner']}'),
                                            (greeting = '
    {$_POST['greeting']}'),
                                            (description1 = '
    {$_POST['description1']}'),
                                            (Price = '
    {$_POST['Price']}'),
                                            (incall = '
    {$_POST['incall']}'),
                                            (description2 = '
    {$_POST['description2']}'),
                                            (Height = '
    {$_POST['Height']}'),
                                            (BodyType = '
    {$_POST['BodyType']}'),
                                            (Liner = '
    {$_POST['Liner']}'),
                                            (HairColor = '
    {$_POST['HairColor']}'),
                                            (EyeColor = '
    {$_POST['EyeColor']}'),
                                            (Ethnicity = '
    {$_POST['Ethnicity']}'),
                                            (UserAge = '
    {$_POST['UserAge']}'),
                                            (AttentionColor = '
    {$_POST['AttentionColor']}'),
                                            (DetailsColor = '
    {$_POST['DetailsColor']}'),
                                            (Preference = '
    {$_POST['Preference']}'),
                                            (Site = '
    {$_POST['Site']}'),
                                            (Website = '
    {$_POST['Website']}'),
                                            (Visit = '
    {$_POST['Visit']}'),
                                            (FromMonth = '
    {$_POST['FromMonth']}'),
                                            (FromDay = '
    {$_POST['FromDay']}'),
                                            (ToMonth = '
    {$_POST['ToMonth']}'),
                                            (ToDay = '
    {$_POST['ToDay']}'),
                                            image = '
    $ImageStr'
                                            where ListingID = '
    {$_GET['id']}' and AgentID = '{$_SESSION['AgentID']}' ";

            
    mysql_query($q1);

            if(
    mysql_error())
            {
                    echo 
    mysql_error();
            }
            else
            {

            
    header("location:info.php?id=$_GET[id]");
            exit();


  4. #54
    Worship the Krome kromey's Avatar
    Join Date
    Sep 2006
    Location
    Fairbanks, AK
    Posts
    1,621
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You do have parentheses in your SQL query. The first one appears right before the column name Weight. Right at the exact point of your SQL error, in fact....
    PHP questions? RTFM
    MySQL questions? RTFM

  5. #55
    SitePoint Addict
    Join Date
    Jan 2006
    Posts
    221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am tired too i have barely slept in the last few days as a result of working on this site work on this site and trying to get it done. I am not sure what I am doing wrong. I made the changes you suggested, maybe i misunderstood how to implement them correctly.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •