BullGuard Antivirus Sale - 60% Off with openElement !
Forum Home Forum Home >

openElement

> Scripts for Your Website
  New Posts New Posts RSS Feed - retrieve data from mysql
  FAQ FAQ  Forum Search   Register Register  Login Login

retrieve data from mysql

 Post Reply Post Reply Page  <12
Author
Message
Dmit OE View Drop Down
Admin Group
Admin Group


Joined: May 31 2012
Status: Offline
Points: 5283
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dmit OE Quote  Post ReplyReply Direct Link To This Post Posted: Mar 19 2016 at 1:33pm
P.S. And change the Position of the first block to StartDocument.
Back to Top
tomos81 View Drop Down
Newbie
Newbie


Joined: Mar 14 2016
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote tomos81 Quote  Post ReplyReply Direct Link To This Post Posted: Mar 19 2016 at 1:40pm
You mean first block - non visual block?
I changed to StartDocument, and nothing shown, no error message...

I modified Your test script: 
$sqlTEST = "SELECT 1";
$result=mysql_query($sqlTEST);
echo "Test - should show '1': $result <br/>";

but nothing shown on webpage - i dont think it will be shown if it is on non visual code block
Back to Top
Dmit OE View Drop Down
Admin Group
Admin Group


Joined: May 31 2012
Status: Offline
Points: 5283
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dmit OE Quote  Post ReplyReply Direct Link To This Post Posted: Mar 19 2016 at 1:49pm
add

echo "SOMETHING";

as the first line of your code, to see if SOMETHING is shown. Please give the link to your page.

And yes, if you try to test it with OE's local preview, it won't work as the local webserver does not support MySQL (only SQLite), so you should either use a WAMP or publish online.
Back to Top
tomos81 View Drop Down
Newbie
Newbie


Joined: Mar 14 2016
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote tomos81 Quote  Post ReplyReply Direct Link To This Post Posted: Mar 19 2016 at 1:56pm
OK I am trying on my local server - webserver is MYSQL , so can be a problem with that?
I placed all my OE project files to www directory on my local apache webserver and trying refresh page after changes I made, and saved the changes.

I downloaded EasyPHP as You suggested, started apache server and MYSQL database...
Made a full restore of data to my local MYSQL.
But still no connection to database

If the code I wrote is OK, i will need to trace why mysql_connect not connecting to my local database.

I also created a test user with password and granted him DBA rights to my local database, making selects with him

Back to Top
Dmit OE View Drop Down
Admin Group
Admin Group


Joined: May 31 2012
Status: Offline
Points: 5283
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dmit OE Quote  Post ReplyReply Direct Link To This Post Posted: Mar 19 2016 at 11:34pm
I replied to your private message; you need to set your page to PHP by using Page->Server Scripts->PHP.
Back to Top
Dmit OE View Drop Down
Admin Group
Admin Group


Joined: May 31 2012
Status: Offline
Points: 5283
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dmit OE Quote  Post ReplyReply Direct Link To This Post Posted: Mar 19 2016 at 11:34pm
P.S. And do not upload the project folder itself, use Export to folder to generate a ready-to-upload website version.
Back to Top
 Post Reply Post Reply Page  <12
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.