Can get mysql database connection but can't get query to retrieve data

I recently got Wappler and was able to get a mysq l data connection to my server. I created a query which just just access one table and should retrieve all fields. When I try to test the query using the “view in browser” option, I get an error : A server error occured, to see the error enable the DEBUG flag.

I don’t know what to do? Please help.
rick

Hello, just enable the debug option as explained here: Debugging Problems and you should see the exact error message, when previewing in browser.

Can post a link to your page that is suppose to retrieve the data?

this is what the debug showed: (the page is http://www.marsalstudios.com/testingwap.php ) only field titles are retrieved. there should be 1 row of data. thanks for repyling.

{“code”:0,“file”:"/home/marsscom/public_html/dmxConnectLib/lib/db/SqlBuilder.php",“line”:185,“message”:“preg_match() expects parameter 2 to be string, object given”,“trace”:"#0 [internal function]: exception_error_handler(2, ‘preg_match() ex…’, ‘/home/marsscom/…’, 185, Array)\n#1 /home/marsscom/public_html/dmxConnectLib/lib/db/SqlBuilder.php(185): preg_match(’/\\s+AS\\s+/i’, Object(stdClass))\n#2 /home/marsscom/public_html/dmxConnectLib/lib/db/SqlBuilder.php(275): lib\db\SqlBuilder->quoteIdentifier(Object(stdClass))\n#3 /home/marsscom/public_html/dmxConnectLib/lib/db/SqlBuilder.php(241): lib\db\SqlBuilder->compileFrom(Object(stdClass))\n#4 [internal function]: lib\db\SqlBuilder->compileComponent(‘from’)\n#5 /home/marsscom/public_html/dmxConnectLib/lib/db/SqlBuilder.php(219): array_map(Array, Array)\n#6 /home/marsscom/public_html/dmxConnectLib/lib/db/SqlBuilder.php(208): lib\db\SqlBuilder->compileSelect()\n#7 /home/marsscom/public_html/dmxConnectLib/modules/dbconnector.php(33): lib\db\SqlBuilder->compile()\n#8 /home/marsscom/public_html/dmxConnectLib/lib/App.php(159): modules\dbconnector->select(Object(stdClass), ‘mailquery’)\n#9 /home/marsscom/public_html/dmxConnectLib/lib/App.php(128): lib\App->execSteps(Object(stdClass))\n#10 /home/marsscom/public_html/dmxConnectLib/lib/App.php(98): lib\App->execSteps(Array)\n#11 /home/marsscom/public_html/dmxConnectLib/lib/App.php(71): lib\App->exec(Object(stdClass))\n#12 /home/marsscom/public_html/dmxConnect/api/mailmessagedb.php(92): lib\App->define(’{\n “meta”: {\n …’)\n#13 {main}"}

How are the query filters set up?

just the field names, no filter so should retrieve all records right?

Yes, if no filters are used, all the records should be returned.
Can you post a screenshot of the UI, where it’s visible what has been added to the query?

Thanks, what happens if you open the database connection options and click test connection button?

I get the connection is ok. perplexing!

I inserted some mysql manual code to retrieve the same data that I can’t get from wappler and it worked which tells me there is something wrong with my confirguation of wappler and/or dmxzone extensions. I have both. I can’t get a simple connection from dreamweaver either.

test file: http://www.marsalstudios.com/test.php
the file shows there are 5 tables in the database and then correctly retrieves the 2 records in the test table used.

i was able to get it to work finally by deleting all dmx folders on the website and letting them be recreated by wappler. It works through the wappler browser. However, I can’t get it to work using the dmxzone extensions in dreamweaver cc2019. Are the extensions different from the wappler versions? Thanks for everyone’s help.
Rick

Yes they’re different.
The ones in Wappler are more advanced and you should not try to work in DW on sites/DB connections created with Wappler.

Thanks. I’ve gotten through all the basic videos and I do like this. Obviously, I just need to get used to this but I do find this so much easier than dreamweaver when it comes to responsive designs. The data connectivity for me is crucial so can’t wait to dig in more.

Thanks for all your help. I’ll stop trying to make dreamweaver work. So far everything looks so much better in Wappler anyway, just have to get used to where everything is.

Rick

Richard Roberts

Photographer and Filmmaker

marsalblackforprint for email signature

1587 Boston Post Rd B5

Westbrook, CT 06498

www.marsalstudios.com

860-395-9644

1 Like