Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot handle datatype I #89

Closed
imidimi opened this issue Sep 9, 2020 · 4 comments
Closed

cannot handle datatype I #89

imidimi opened this issue Sep 9, 2020 · 4 comments

Comments

@imidimi
Copy link

imidimi commented Sep 9, 2020

For all the data types its working fine, but as soon I data type comes in any table it gives this error. Can you please review it?

@imidimi imidimi changed the title cannot handle datatypeI () cannot handle datatypeI Sep 9, 2020
@gam6itko
Copy link
Collaborator

gam6itko commented Sep 9, 2020

Can you provide file and code example?

@gam6itko gam6itko changed the title cannot handle datatypeI cannot handle datatype I Sep 9, 2020
@gam6itko gam6itko changed the title cannot handle datatype I cannot handle datatype I Sep 9, 2020
@imidimi
Copy link
Author

imidimi commented Sep 9, 2020

Getting all fields for the table first. Then assigning them values.
SALES.zip

$tableA = get('C:\\pcmrpw\\' . $saleTable);
$allColumns = $tableA->getColumns();

foreach ($allColumns as $key => $column) {
    $allColumns[$key] = isset($_POST[$key]) ? $_POST[$key] : '';
}

$tableB = add('C:\\pcmrpw\\' . $saleTable);
$tableB->openWrite();
$newRecord = $tableB->appendRecord();

foreach ($allColumns as $key => $column) {
    $newRecord->{$key} = isset($_POST[$key]) ? $_POST[$key] : '';
}

$tableB->writeRecord();
$tableB->pack();
$tableB->close();
unset($newRecord);

@gam6itko
Copy link
Collaborator

gam6itko commented Sep 9, 2020

@imidimi I'll fix it asap

@gam6itko
Copy link
Collaborator

fixen in 2267452

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants