Help
Posted: Thu Mar 04, 2010 7:19 am
I have the following code in a table which i am trying to use to edit existing data i.e. a ticket is originally normal but we decide it needs to be changed to high:
the bit in red is where i am trying to call back the priority already selected doesn't work (it always selects value 1)
the query where i am originally calling the data:
Help plz
Code: Select all
<tr><th class='smooth'>Priority</th></tr>
<tr><td class='menu_item'><select style="width:250px;" name='pri' [color=#FF0000]value='<? echo $item['priority']; ?>' [/color]id='pri'>
<option value='1'>High</option>
<option value='2'>Normal</option>
<!-- <option value='3'>Low</option>
<option value='4'>Work Request</option> -->
</select></td></tr>the query where i am originally calling the data:
Code: Select all
$item = mssql_fetch_array(mssql_query("SELECT busphone = (case faultlog.company when 'None' then cedarlog.telephone else contact.busphone end),tickettype, queueid,CONVERT(char(10),logged,103) as logged_fmt,priority,DATEDIFF(s,notes.date,GETDATE()) AS elapsed,engineer.forename +' '+engineer.surname as engineer,faultlog.enduser,(contact.forename + ' ' + contact.surname) as contact,contact.contract,faultlog.description,faultlog.chargable,faultlog.logged,faultlog.id as id,queue.description as queue,faultlog.id_prefix,(faultlog.id_prefix + faultlog.id) as callid,faultlog.engid,faultlog.company,calltype.name AS type, callstatus.name as status FROM faultlog INNER JOIN queue ON queue.id = faultlog.queueid LEFT OUTER JOIN contact ON contact.id=faultlog.contid INNER JOIN calltype ON calltype.id=faultlog.typeid INNER JOIN callstatus ON callstatus.id=faultlog.status INNER JOIN engineer ON engineer.id=faultlog.engid LEFT OUTER JOIN cedarlog ON faultlog.id=cedarlog.id AND faultlog.id_prefix=cedarlog.id_prefix LEFT OUTER JOIN notes ON (notes.id = faultlog.id AND notes.id_prefix=faultlog.id_prefix) WHERE faultlog.id_prefix='" . $_GET['pfx'] . "' AND faultlog.id=" . $_GET['id'],$db));Help plz