Jump to content

mcmuney

Members
  • Posts

    358
  • Joined

  • Last visited

Contact Methods

  • AIM
    mcmuney
  • Website URL
    http://www.4yn.com

Profile Information

  • Gender
    Not Telling

mcmuney's Achievements

Advanced Member

Advanced Member (4/5)

0

Reputation

  1. I'm using the code below, which displays the most recent 15 results. I'd like to modify it so that it displays the most recent 15 results in random order. How can I achieve this within the code below without having to use another query? SELECT mem_id,type_id,date_added,value FROM sc_coins_asset WHERE value<>'0' ORDER BY date_added DESC LIMIT 0,15
  2. What I'm trying to do involves 3 tables: Table1: id, status Table2: id, value Table3: id, value1, value2 Step1: Pull all unique id numbers where status=1 from Table1 Step2: For each id pulled in Step1, insert a value=(random number between 1-5; important: the random number should be different for each insert for each id) into Table2 Step3: For each id and value inserted in Step2, update in Table3 where Table3.id=Table2.id set value1=(existing value +1) and value2=(existing value +the random value inserted in Step2 Any guidance would be greatly appreciated. Thanks.
×
×
  • 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.