www.webdeveloper.com
Results 1 to 3 of 3

Thread: i need help with a php statement

Hybrid View

  1. #1
    Join Date
    Jun 2011
    Location
    California
    Posts
    383

    Question i need help with a php statement

    If my uniqueid and my image id are equal and it's active as the main image...it appears on the page.. but if a new image is uploaded i need the old image to be un active now and the new image to become the default active image... can someone help me with this php if else statement.


    Here's my sql statement:

    Code:
    SELECT TOP 1000 [id]
          
          [uniqueid],
          [image_id],
          [active]
          
          
      FROM [event].[AAA].[tracker]
      
      where active = '1'

  2. #2
    Join Date
    Jun 2011
    Location
    California
    Posts
    383
    Does that make sense?

  3. #3
    Join Date
    Aug 2012
    Posts
    155
    So when you run the query to add the new image you need ensure you set active = 1 and then run a query to change the current image to active = 0 (sorry if you have done this but you mention you are posting your if else statement and all you have posted is your select query which is no help (in fact I don't even understand your query, especially all those [] ).

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles