Jump to content

[SOLVED] if/else question


secoxxx

Recommended Posts

could you give more information as to what your requrement is ?

 

There is one suggesstion, not a solution. maybe it will help

 

Try changing your logic to this

 

write a query to get the data in the ascending order [with respect to some field like id or time - which we know, whose data will be in some definite order.]

 

get the data into an array, and do the processing for all elements, till you reach the last element.

 

when you reach the last element, echo ('NEW!');

 

 

or,

 

if you want to detect the last row of the table, then sort the query in descending order with respect to some field like time, id etc

 

Regards

Link to comment
Share on other sites

i have a list from the database.

SELECT * FROM dvd ORDER BY dvd_id DESC

 

this shows everything i want, but i want to add a NEW! under the lastest dvd added thumbnail

 

im just not sure how to integrate a if else into a query or if i even need to.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.