@vdLocal @vdSQL @vdphp

More
9 years 1 month ago #2984 by vdata-fan
Hi,

I'd like to modify the Export/Import in this way:


foo,name
bar,name
this,name


into

foo1,name
bar1,name
this1,name


i've tried:

@vdphp:@vdLocal:0 . ""
@vdphp:"@vdLocal:0" . ""

even @vdLocal:0
or @vdLocal:1

and many other combinations

they did not work !!!

please can you send my a documentation to these funtions (@vdphp @vdsql and @vdphp)
with some

expressive and functional examples

thank you

cheers

Please Log in to join the conversation.

More
9 years 1 month ago - 9 years 1 month ago #2987 by Daniel
Replied by Daniel on topic @vdLocal @vdSQL @vdphp
Hi,
Here It is:

1. @vdPhp: You can use any PHP function with this e.g. @vdPhp:date('Y-m-d')
2. @vdSql: You can use any MySql function with this e.g. @vdSql:now()
3. @vdLocal: You can import any Data field from CSV, XML, JSON file or from Remote Database. e.g.

If you are importing data from CSV file you can represent the value with column number e.g. @vdLocal:6 It would return the seventh column in CSV file.
In case of XML, JSON you can represent the value with variable name e.g. @vdLocal:title, It would return the value from "title" variable.
In case of Database you can represent the value with Database column name e.g. @vdLocal:email, It would return the value from email field.

If you combine these functions e.g. If you want to import only a part ( from sixth character till end ) of the string available in fourth column of your CSV file then you can do the following:

@vdPhp:substr("@vdLocal:3", 5)

Hope It answers your query. You can also refer to this post: www.wdmtech.com/support-forum/vdata/some...s-to-import-from-csv

Thanks
Daniel
Last edit: 9 years 1 month ago by Daniel.

Please Log in to join the conversation.

Cron Job Starts