Jump to content

Benobis

New Members
  • Posts

    9
  • Joined

  • Last visited

Benobis's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thank you all for your replies and help. This trick saved my life Pikachu2000 Now all is fine. Once again thanks ! ! Regards,
  2. Hi, Thanks for reply. So it should looks like: $q="select `gs_hr`.`rin$hr` as `rin`,`gs_hr`.`uin$hr` as `uin`,`gs_hr`.`cl$hr` as `cl`,`gs_hr`.`out$hr` as `out`,`gs_hr`.`f$hr` as `f`,`gs_hr`.`a$hr` as `a`,`gs_hr`.`rin$hrl` as `rinhrl`,`gs_hr`.`out$hrl` as `outhrl`,`gs_hr`.`d` as `d`,`gs_tr`.`r` as `r`,`gs_tr`.`t` as `t`,`gs_tr`.`tr` as `tr`,`gs_tr`.`otr` as `otr`,`gs_tr`.`htr` as `htr`,`gs_tr`.`hotr` as `hotr`,`gs_tr`.`dowed` as `dowed`,`gs_tr`.`a` as `ca`,`gs_tr`.`drin` as `drin`,`gs_tr`.`dout` as `dout`,`gs_tr`.`etr` as `etr` from `gs_hr`,`gs_tr` where gs_hr.d=gs_tr.d"; Right?
  3. i see ... but i have to use backticks like this: $q="select `gs_hr.rin$hr` as `rin`,`gs_hr.uin$hr` as `uin`, ?
  4. ok.... thanks ... so it will be fine like this: $q="select `gs_hr.rin$hr` as `rin`,`gs_hr.uin$hr` as `uin`, ...... ?
  5. yes, i checked it...but sorry... im not sure how to use backticks .. should it be somethg like this: $q="select 'gs_hr.rin$hr' as 'rin','gs_hr.uin$hr' as 'uin', ...... ?
  6. Hi, Can you give me example how it should look like with backticks please?
  7. added. Got messg on the screen: select gs_hr.rin12 as rin,gs_hr.uin12 as uin,gs_hr.cl12 as cl,gs_hr.out12 as out,gs_hr.f12 as f,gs_hr.a12 as a,gs_hr.rin11 as rinhrl,gs_hr.out11 as outhrl,gs_hr.d as d,gs_tr.r as r,gs_tr.t as t,gs_tr.tr as tr,gs_tr.otr as otr,gs_tr.htr as htr,gs_tr.hotr as hotr,gs_tr.dowed as dowed,gs_tr.a as ca,gs_tr.drin as drin,gs_tr.dout as dout,gs_tr.etr as etr from gs_hr,gs_tr where gs_hr.d=gs_tr.d Can you help me please?
  8. Hi, Thanks for reply. Echo shows me: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'out,gs_hr.f4 as f,gs_hr.a4 as a,gs_hr.rin3 as rinhrl,gs_hr.out3 as outhrl,gs_hr.' at line 1 On site is got error: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in ... 131 Lines 129-131: 129 | $q="select gs_hr.rin$hr as rin,gs_hr.uin$hr as uin,gs_hr.cl$hr as cl,gs_hr.out$hr as out,gs_hr.f$hr as f,gs_hr.a$hr as a,gs_hr.rin$hrl as rinhrl,gs_hr.out$hrl as outhrl,gs_hr.d as d,gs_tr.r as r,gs_tr.t as t,gs_tr.tr as tr,gs_tr.otr as otr,gs_tr.htr as htr,gs_tr.hotr as hotr,gs_tr.dowed as dowed,gs_tr.a as ca,gs_tr.drin as drin,gs_tr.dout as dout,gs_tr.etr as etr from gs_hr,gs_tr where gs_hr.d=gs_tr.d"; 130 | $r=mysql_query($q); 131 | while($row=mysql_fetch_array($r)){$d=$row["d"]; Please help
  9. Hi, I changed mysql4 to mysql5 and have a problem. Propably this query from mysql4 (worked there fine) gives me syntax error in mysql5: $q="select gs_hr.rin$hr as rin,gs_hr.uin$hr as uin,gs_hr.cl$hr as cl,gs_hr.out$hr as out,gs_hr.f$hr as f,gs_hr.a$hr as a,gs_hr.rin$hrl as rinhrl,gs_hr.out$hrl as outhrl,gs_hr.d as d,gs_tr.r as r,gs_tr.t as t,gs_tr.tr as tr,gs_tr.otr as otr,gs_tr.htr as htr,gs_tr.hotr as hotr,gs_tr.dowed as dowed,gs_tr.a as ca,gs_tr.drin as drin,gs_tr.dout as dout,gs_tr.etr as etr from gs_hr,gs_tr where gs_hr.d=gs_tr.d"; I need this query working on mysql5. Could you please help me convert it ? Benobis
×
×
  • 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.