This is a discussion on "Help Please Select Max Not Working" within the PHP Forum section. This forum, and the thread "Help Please Select Max Not Working are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Help Please Select Max Not Working
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Help Please Select Max Not Working
Hi,
Can someone please tell me what is wrong with this code, it is doing my nut!!!!! $result=mysql_query("SELECT max(productcode) FROM tblproductcodes where categoryID=$category"); $lastproductcode=mysql_fetch_row($result); echo $lastproductcode[productcode]; I have checked that something is returned, one row is returned, yet I cannot for the life of me get the resulting figure out, it's just blank. What am I doing wrong? Please help It's sad enough that I'm spending my Saturday evening working, but even worse that what I'm doing is not even working. Thank you in advance |
|
|
|
|||
|
Re: Help Please Select Max Not Working
Try
echo $lastproductcode[0]; |
|
|||
|
Re: Help Please Select Max Not Working
how is php work?... the two are completely different.
If grahame's solution doesnt work you may try adding the '' and do:
|
![]() |
| Tags |
| phpselect max |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| chained select box dependable select | thenamenoonehastaken | JavaScript Forum | 0 | Feb 8th, 2008 05:49 |
| Clone Select - Rename not working in IE | Awok | JavaScript Forum | 1 | Jan 9th, 2008 17:22 |
| styling a select box, using php, ..not working...need help | sambkk | Web Page Design | 0 | Feb 5th, 2007 19:22 |
| CSS and select | djme | Web Page Design | 1 | Mar 2nd, 2006 02:05 |
| Select a row and go! Please help? | taymond | JavaScript Forum | 1 | Nov 16th, 2005 15:50 |