joomla - php and table formatting -


Hi all I have the following php that I would like to set up every echo command in my table row, but I am having any problems. Is .... somewhere ....

  & lt ;? Php $ db = Jfc: :: getDBO (); Choose from $ Q = "#__jbjobs_employer, where user_id =". $ Job- & gt; Employer_id; $ Db- & gt; SetQuery ($ Q); $ Employer_record = $ db- & gt; Load Object (); Resonance ($ employer_record-> show_adv == 'y')? "Address:". Employer_record-> Road_adr., '. $ Employer_record- & gt; city.', '. Employer_record-> Status: JText :: _ ('JBJOBS_NOT_DISPLAYED'). & Lt; Br> ; Echo ($ employer _record-> show_phone == 'Y')? "Phone:". $ Employer_record- & gt; Primary-phone: JText :: _ ('JBJOBS_NOT_DISPLAYED'). '& Lt; Br> & # 39; & # 39; Echo ($ employer_record-> show_fax == 'Y')? "Fax:". $ Employer_record- & gt; Fax_Number: Jetext :: _ ('JBJOOS_ONAdIdited'). '& Lt; Br> & # 39; & # 39; $ U = Jfc :: Mill User ($ Job-> Employer_ID); Echo ($ employer _record-> show_email == 'Y')? "E-mail:". $ U- & gt; Email: JText :: _ ('JBJOBS_NOT_DISPLAYED'); ? & Gt;  

I tried to put it down with the snippet, but I do not know anything about php, everything does not appear in a table

  & lt;? Php $ db = JFTC :: Milan (DDBO); Choose from $ Q = "#__jbjobs_employer, where user_id =". $ Job- & gt; Employer_id; $ Db- & gt; SetQuery ($ Q); $ Employer_record = $ db- & gt; Load Object (); '& Lt; Width of table = "100%" range = "0" cell area = "0" cellpadding = "0" & ​​gt; & Lt; TR & gt; & Lt; Td> '; Echo ($ employer_record-> show_adv == 'wai')? "". Employer_record-> Road_andr: jettext :: _ ('jbjoos_onadidad'). '& Lt; / Tr & gt; & Lt; TR & gt; & Lt; TD & gt; '; Echo ($ employer_record-> show_space == 'Y')? "Employer_Record-> City. ','. $ Employer_Record- & gt; Status: JText :: _ ('JBJOBS_NOT_DISPLAYED'). '& Lt; / td> & lt; / tr & gt; & lt; TR & gt; & lt; td & gt; '; resonance ($ employer _record-> show_phone ==' Y ')? ". Employer_Record-> Primary_phone: JText :: _ (' JBJOBS_NOT_DISPLAYED '). '& Lt; / td & gt; & lt; / tr & gt; & lt; tr & gt; & lt; td & gt;'; echo ($ employer_record-> show_fax == 'Y')? " Employer_Record-> Fax_Number: Jetext :: _ ('JBJOOS_ONADIADAD'). '& Lt; / td & Gt; & lt; / tr & gt; & lt; tr & gt; & lt; td & gt; '$ U = JFTC :: Mill User ($ Job-> Employer_ID); Resonance ($ Employer _Record - & gt; show_email == 'Y')? "". $ U-> Email: JText :: _ ('JBJOBS_NOT_DISPLAYED'); ' & lt; / td & gt; & Lt; / TR & gt; & gt; & gt; & gt; & gt; & gt; & gt; & gt;  

Can someone please hand? Thanks !!!!

< Firstly, you should write your query so much that it uses Joomla coding up to date standard

$ db = JF Isi :: get (); $ Query = $ db- & gt; GetQuery (true); ($ Db-> quoteName ('#__ jbjobs_employer')) - & gt; Select ($ db- & quot; quoteName ('$ db-> quoteName') from ($ db-> quoteName ('*')) - & gt; $ Db- & gt; Setup ($ query) ; $ Employer_record = $ db-> Load Object (); $ db->

To display it again, you must echo will be used:

  echo> table width = "100%" range "=" 0 "cellpadding =" 0 "cellpadding =" 0 "& gt; < In addition, on the one side note, you have to close your opening  td  on the first set of results, then replace it: 

  JText :: _ ('JBJOB   & Lt; / td>  

Hope this helps


Comments