Jump to content

db array


leequalls

Recommended Posts

I need some help with the following code I need it to output the data it is only outputting the number from the table.

 

 

code:

while($nResult[$nexthour] != $aResult[$hour]) {

  $que = mysql_query('SELECT '.$nexthour.' from rp_timetable WHERE `rp_timetable`.`day` = "'.$nextday.'"') or die(mysql_error());

            $nextmixologist = mysql_fetch_array($que, MYSQL_ASSOC);

            if($djName != $nextmixologist[$nexthour]) { $nResult[$nexthour] = $nextmixologist[$nexthour]; break; }

            $nexthour++;

            }[code=php:0]

 

database

day123456789

Mondaydatadatadatadatadatadatadatadatadata

Tuesdaydatadatadatadatadatadatadatadatadata

Link to comment
Share on other sites

structure

 

Field Type                 Collation                 Null

day varchar(30) latin1_swedish_ci No

1 varchar(30) latin1_swedish_ci No

2 varchar(30) latin1_swedish_ci No

3 varchar(30) latin1_swedish_ci No

4 varchar(30) latin1_swedish_ci No

5 varchar(30) latin1_swedish_ci No

6 varchar(30) latin1_swedish_ci No

7 varchar(30) latin1_swedish_ci No

8 varchar(30) latin1_swedish_ci No

9 varchar(30) latin1_swedish_ci No

10 varchar(30) latin1_swedish_ci No

11 varchar(30) latin1_swedish_ci No

12 varchar(30) latin1_swedish_ci No

13 varchar(30) latin1_swedish_ci No

14 varchar(30) latin1_swedish_ci No

15 varchar(30) latin1_swedish_ci No

16 varchar(30) latin1_swedish_ci No

17 varchar(30) latin1_swedish_ci No

18 varchar(30) latin1_swedish_ci No

19 varchar(30) latin1_swedish_ci No

20 varchar(30) latin1_swedish_ci No

21 varchar(30) latin1_swedish_ci No

22 varchar(30) latin1_swedish_ci No

23 varchar(30) latin1_swedish_ci No

24 varchar(30) latin1_swedish_ci No

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.