CodingRenumber MySQL UID field

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  Lucy (X3N0PH0N)  
 To:  koswix      
39631.21 In reply to 39631.18 
(just a note: that will result in an array of arrays. i.e. $hooray will be an array containing arrays containing the result elements. So the first element of the first result will be at $hooray[0][0], second element of the first result at $hooray[0][1] and first element of the second result at $hooray[1][0] and so on)
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  koswix      
39631.22 In reply to 39631.18 
It's not my solution, but it works perfectly.
0/0
 Reply   Quote More 

 From:  Lucy (X3N0PH0N)  
 To:  koswix      
39631.23 In reply to 39631.20 
As above. I think fetch_array produces both an indexed and an associative array (or one which acts as both, I dunno (and they might not be the right words)).

So you can do either:

$hooray[0]['text'] or $hooray[0][0]

They will point to the same thing.
0/0
 Reply   Quote More 

 From:  koswix   
 To:  Peter (BOUGHTONP)     
39631.24 In reply to 39631.22 
Tis, cos you made me look at it. But you failed to adjust it to fit my exact requirements.



                                                
                                                
                                                
                           ▪                    
             ┌────┐    ┌────┐                      
          │    │    │    │ ▪                    
          │    └────┘    │                      
          │   ──┐  ┌──   │ ▪                    
   ┌──────┤    ▪    ▪    │                      
  ┌┘      │              │ ▪                    
┌─┤       └──┐  │  │  ┌──┘                      
│ │          │ ││  ││ │   ┌─┐                   
│ │          └─┼┤  └┴─┴───┘ │                   
│ │           ─┘│           │                   
│ │   ┌──────┐  └┬──────────┘                   
  │   │      │   │                              
  │   │      │   │                              
  └───┘      └───┘                              
0/0
 Reply   Quote More 

 From:  koswix   
 To:  Lucy (X3N0PH0N)     
39631.25 In reply to 39631.23 

(hug)

 

Thank you! That was the vital bit of information that I couldn't be bothered getting my huge, and severely out of date, PHP book down off the shelf for (kiss)




                                                
                                                
                                                
                           ▪                    
             ┌────┐    ┌────┐                      
          │    │    │    │ ▪                    
          │    └────┘    │                      
          │   ──┐  ┌──   │ ▪                    
   ┌──────┤    ▪    ▪    │                      
  ┌┘      │              │ ▪                    
┌─┤       └──┐  │  │  ┌──┘                      
│ │          │ ││  ││ │   ┌─┐                   
│ │          └─┼┤  └┴─┴───┘ │                   
│ │           ─┘│           │                   
│ │   ┌──────┐  └┬──────────┘                   
  │   │      │   │                              
  │   │      │   │                              
  └───┘      └───┘                              
0/0
 Reply   Quote More 

 From:  Lucy (X3N0PH0N)  
 To:  koswix      
39631.26 In reply to 39631.20 
If you're simply taking 6 results with one field each then it's just $array[0][0] to $array[5][0]
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  koswix      
39631.27 In reply to 39631.24 
You didn't hire me to fit it to your exact requirements.
0/0
 Reply   Quote More 

 From:  koswix   
 To:  Lucy (X3N0PH0N)     
39631.28 In reply to 39631.26 

Yay, it's all working now, I think I can forget about it now.

 


Pete: It was implied.




                                                
                                                
                                                
                           ▪                    
             ┌────┐    ┌────┐                      
          │    │    │    │ ▪                    
          │    └────┘    │                      
          │   ──┐  ┌──   │ ▪                    
   ┌──────┤    ▪    ▪    │                      
  ┌┘      │              │ ▪                    
┌─┤       └──┐  │  │  ┌──┘                      
│ │          │ ││  ││ │   ┌─┐                   
│ │          └─┼┤  └┴─┴───┘ │                   
│ │           ─┘│           │                   
│ │   ┌──────┐  └┬──────────┘                   
  │   │      │   │                              
  │   │      │   │                              
  └───┘      └───┘                              
0/0
 Reply   Quote More 

 From:  Lucy (X3N0PH0N)  
 To:  koswix      
39631.29 In reply to 39631.28 
(cheer)
0/0
 Reply   Quote More 

Reply to All    
 

1–20  21–29

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats