All popular questions related to OS Property will be posted here

auto increment REF field

More
9 years 10 months ago #56525 by paolo
auto increment REF field was created by paolo
It will be very useful to have the #REF field that auto increment as the ID field.
I know that actually it doesn't work but I need this feature.
what I have to modify to have the ref number equal to the id number?
thank you in advance

Please Log in or Create an account to join the conversation.

  • Mr. Dam
  • Away
  • Administrator
  • Administrator
More
9 years 10 months ago #56531 by Mr. Dam
Replied by Mr. Dam on topic auto increment REF field
Hi,
Currently, the Ref field can't be auto-incresement. But you can modify the set the Ref = Property ID by following bellow modification
Please open file
components > com_osproperty > classes > listing.php
and
administrator > components > com_osproperty > classes > property.php
$id = $db->insertID();
and add this line bellow
$db->setQuery("Update #__osrs_properties set ref = '$id' where id = '$id'");
$db->query();
Thanks
Dam

Please Log in or Create an account to join the conversation.

More
9 years 7 months ago #63038 by Stephen
Replied by Stephen on topic auto increment REF field
Hi
There is something that I must do wrong here, but I´ve tried to have the Ref# field the same as property ID.
I have read here in the forums and tried everything that has been proposed here, but still, I can´t get it to work.
What must I do to get Ref # field to automatic retrieve the ID number of the property.

If the problem can be solved why worry? If the problem can not be solved, worrying will do you no good.

Please Log in or Create an account to join the conversation.

  • Mr. Dam
  • Away
  • Administrator
  • Administrator
More
9 years 6 months ago #63122 by Mr. Dam
Replied by Mr. Dam on topic auto increment REF field
Hi,
In next OS Property version, we will add option to set the Ref = ID number. I think it will be easier for you to solve the problem.
Thanks
Dam
The following user(s) said Thank You: Stephen

Please Log in or Create an account to join the conversation.

More
9 years 6 months ago #63140 by Stephen
Replied by Stephen on topic auto increment REF field
Great.
Looking forward to this update.

If the problem can be solved why worry? If the problem can not be solved, worrying will do you no good.

Please Log in or Create an account to join the conversation.

More
8 years 7 months ago #80563 by jamal
Replied by jamal on topic auto increment REF field
Hi,

Please How i can delete REF from titile ads. I want just title withount REF. why REF?

Thanks

Please Log in or Create an account to join the conversation.

Moderators: Mr. DamNguyen Phu Quan