Jump to content
ashfaq098

Please help me about custom field adding

Recommended Posts

I have add custom field in serivce.php file and after click on filter i get the error blow

Please help me how i fix the problem Thanks

 

For additional assistance, please reference the WHMCS TroubleShooting Guide »

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'tblhosting.Productname' in 'field list' in /home/aacccamc/public_html/clientsarea/vendor/illuminate/database/Connection.php:333
Stack trace:
#0 /home/aacccamc/public_html/clientsarea/vendor/illuminate/database/Connection.php(333): PDO->prepare('select `tblhost...')
#1 /home/aacccamc/public_html/clientsarea/vendor/illuminate/database/Connection.php(706): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'select `tblhost...', Array)
#2 /home/aacccamc/public_html/clientsarea/vendor/illuminate/database/Connection.php(669): Illuminate\Database\Connection->runQueryCallback('select `tblhost...', Array, Object(Closure))
#3 /home/aacccamc/public_html/clientsarea/vendor/illuminate/database/Connection.php(342): Illuminate\Database\Connection->run('select `tblhost...', Array, Object(Closure))
#4 /home/aacccamc/public_html/clientsarea/vendor/illuminate/database/Query/Builder.php(1583): Illuminate\Database\Connection->select('select `tblhost...', Array, true)
#5 /home/aacccamc/public_html/clientsarea/vendor/illuminate/database/Query/Builder.php(1569): Illuminate\Database\Query\Builder->runSelect()
#6 /home/aacccamc/public_html/clientsarea/modules/reports/services.php(246): Illuminate\Database\Query\Builder->get()
#7 /home/aacccamc/public_html/clientsarea/admin/reports.php(0): unknown()
#8 {main}
Next Illuminate\Database\QueryException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'tblhosting.Productname' in 'field list' (SQL: select `tblhosting`.`Productname` from `tblhosting` inner join `tblclients` on `tblclients`.`id` = `tblhosting`.`userid`) in /home/aacccamc/public_html/clientsarea/vendor/illuminate/database/Connection.php:713
Stack trace:
#0 /home/aacccamc/public_html/clientsarea/vendor/illuminate/database/Connection.php(669): Illuminate\Database\Connection->runQueryCallback('select `tblhost...', Array, Object(Closure))
#1 /home/aacccamc/public_html/clientsarea/vendor/illuminate/database/Connection.php(342): Illuminate\Database\Connection->run('select `tblhost...', Array, Object(Closure))
#2 /home/aacccamc/public_html/clientsarea/vendor/illuminate/database/Query/Builder.php(1583): Illuminate\Database\Connection->select('select `tblhost...', Array, true)
#3 /home/aacccamc/public_html/clientsarea/vendor/illuminate/database/Query/Builder.php(1569): Illuminate\Database\Query\Builder->runSelect()
#4 /home/aacccamc/public_html/clientsarea/modules/reports/services.php(246): Illuminate\Database\Query\Builder->get()
#5 /home/aacccamc/public_html/clientsarea/admin/reports.php(0): unknown()
#6 {main}

 

Screenshot_2020-05-14 WHMCS - Reports.png

Share this post


Link to post
Share on other sites

The error is pretty self explanatory. There is no such column 'productname' in the tblhosting table. You'll have to get what you're after another way.

Don't add things to the WHMCS specific tables, this is just bad, bad, bad, and will cause problems. Instead, you want to create your own tables and do things that way.

Share this post


Link to post
Share on other sites
18 hours ago, twhiting9275 said:

Don't add things to the WHMCS specific tables, this is just bad, bad, bad, and will cause problems. Instead, you want to create your own tables and do things that way.

I suspect that he's asking about writing a custom report that incorporates custom fields rather than thinking about adding columns to existing database tables. 🙂

Share this post


Link to post
Share on other sites
3 hours ago, brian! said:

I suspect that he's asking about writing a custom report that incorporates custom fields rather than thinking about adding columns to existing database tables

Seems so...

Z8j7C5i.png

Share this post


Link to post
Share on other sites
8 hours ago, brian! said:

I suspect that he's asking about writing a custom report that incorporates custom fields rather than thinking about adding columns to existing database tables. 🙂

It may be, but that's not what the error said was going on :)

Share this post


Link to post
Share on other sites
9 hours ago, twhiting9275 said:

It may be, but that's not what the error said was going on 🙂

far be it from me to teach a guru to suck eggs, but it is - that's the error you would get if you add a fieldname that doesn't exist to the services report and then try to include it in the output... nobody's mentioning altering tables other than you. 🙂

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated