Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 12:47 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Android connect PHP - MySQL
PostPosted: December 27th, 2017, 10:19 am 
Offline

Joined: August 21st, 2012, 5:36 pm
Posts: 20
Location: Portugal
Opus: OPUS PRO v9.6
OS: Windows 8 x64
Good day,

This script works well in desktop but not in android.
I don't get data from the database.
What is wrong?

function querySearch()
{

TextDataHoje.SetSelection(0,-1)
search = TextDateToday.GetSelectionText()
var url = "http://server.com/scripts/app.php"
var obj =new Object()
obj.tabela = table
obj.pesq = search
var post = InternetPostData(url,obj,true)

TEXT.SetSelection(-1,0);
TEXT.ReplaceSelection(post.print_DATA);
....
}


<?php

$DBhost = "localhost";
$DBuser = "username";
$DBpass = "userpassword";
$DBName = "databasename";

$tabela = $_POST["tabela"];
$pesq = $_POST["pesq"];

$connect = mysql_connect($DBhost,$DBuser,$DBpass);
$db = mysql_select_db($DBName,$connect);
$query = "SELECT * FROM $tabela WHERE data ='".$pesq."'";
$result = mysql_query($query, $connect);
mysql_data_seek($result, $reg);
$row = mysql_fetch_array($result );

$data = "&print_ID=".$row['id']."&print_DATA=".$row['data'],...;
echo $data;
?>


For this message JATBorges has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Android connect PHP - MySQL
PostPosted: January 3rd, 2018, 8:36 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Have you enabled Internet Access on the options tab when publishing?

</mack>

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: Android connect PHP - MySQL
PostPosted: January 8th, 2018, 10:55 am 
Offline

Joined: August 21st, 2012, 5:36 pm
Posts: 20
Location: Portugal
Opus: OPUS PRO v9.6
OS: Windows 8 x64
Good day mackavi,
I am Not able to create the app because I'm with this error "Error launching apktool"


For this message JATBorges has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Android connect PHP - MySQL
PostPosted: January 8th, 2018, 11:00 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
You do have the SE SDK installed?

</mack>

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: Android connect PHP - MySQL
PostPosted: January 8th, 2018, 1:09 pm 
Offline

Joined: August 21st, 2012, 5:36 pm
Posts: 20
Location: Portugal
Opus: OPUS PRO v9.6
OS: Windows 8 x64
yes i have.

C:\Program Files (x86)\Java\jdk1.8.0_152
C:\Program Files (x86)\Android\android-sdk


For this message JATBorges has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Android connect PHP - MySQL
PostPosted: January 8th, 2018, 3:50 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Unfortunately, as I use Opus and XDK for Android applications, with the exception of knowing that it works with the SDK which was already configured for other software I use, I don't have any need for the in-built solution and no experience of anything but basic problems.

I can tell you that you're using the 32 bit version and my system and Opus are using the 64bit. Maybe that's the problem.

</mack>

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: Android connect PHP - MySQL
PostPosted: January 8th, 2018, 5:41 pm 
Offline

Joined: August 21st, 2012, 5:36 pm
Posts: 20
Location: Portugal
Opus: OPUS PRO v9.6
OS: Windows 8 x64
do you convert the project to HTML5 and with the XDK for Android to create a app?


For this message JATBorges has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Android connect PHP - MySQL
PostPosted: January 8th, 2018, 10:00 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
There's no converting needed. Both Opus and XDK simply wrap HTML5 code for Android (or other devices).

You can just build in Opus HTML5 you don't need to select the Android option. The only requirement is that the main file is called index.html.

Opus Android is much, much easier than XDK to use though.

</mack>

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: Android connect PHP - MySQL
PostPosted: January 11th, 2018, 10:04 am 
Offline

Joined: August 21st, 2012, 5:36 pm
Posts: 20
Location: Portugal
Opus: OPUS PRO v9.6
OS: Windows 8 x64
I've managed it to work.

thank you mac

but this don' t work in html5 why?

function data()
{

switch(SYSTEM_TIME_MONTH)
{

case "Jan":
currMonth ="Janeiro";
break;

case "Feb":
currMonth ="Feveiro";
break;

case "Mar":
currMonth ="Março";
break;

case "Apr":
currMonth ="Abril";
break;

case "Jun":
currMonth ="Junho";
break;

case "Jul":
currMonth ="Julho";
break;

case "Aug":
currMonth ="Agosto";
break;

case "Sep":
currMonth ="Setembro";
break;

case "Oct":
currMonth ="Outubro";
break;

case "Nov":
currMonth ="Movembro";
break;

case "Dec":
currMonth ="Dezembro";
break;

default:
break;

}

DATA_HOJE = null
DATA_HOJE = SYSTEM_TIME_DATE+" "+currMonth+" "+SYSTEM_TIME_YEAR
TextDataHoje.ReplaceSelection(DATA_HOJE)
}


For this message JATBorges has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Android connect PHP - MySQL
PostPosted: January 11th, 2018, 3:10 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
When you say doesn't work - do you get an undefined message on screen?

</mack>

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: Android connect PHP - MySQL
PostPosted: January 11th, 2018, 4:55 pm 
Offline

Joined: August 21st, 2012, 5:36 pm
Posts: 20
Location: Portugal
Opus: OPUS PRO v9.6
OS: Windows 8 x64
does not appear any message


For this message JATBorges has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Android connect PHP - MySQL
PostPosted: January 11th, 2018, 6:47 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
From just the code, I don't see what would cause no message to appear. It would be 'undefined' if the variables hadn't updated which will occur if called too soon or not triggered, such as not having any variable on screen to update.

Does it work in Opus preview?

Also, why are you replacing text - rather than simply displaying the DATA_HOJE variable on the page?

</mack>

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: Android connect PHP - MySQL
PostPosted: January 11th, 2018, 8:14 pm 
Offline

Joined: August 21st, 2012, 5:36 pm
Posts: 20
Location: Portugal
Opus: OPUS PRO v9.6
OS: Windows 8 x64
works well

I can send you a link to dropbox.


For this message JATBorges has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Android connect PHP - MySQL
PostPosted: January 12th, 2018, 10:34 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Working switch-case. Download from our website using code: switchcase@digitalgrapevine.info

</mack>

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: Android connect PHP - MySQL
PostPosted: January 22nd, 2018, 10:14 am 
Offline

Joined: August 21st, 2012, 5:36 pm
Posts: 20
Location: Portugal
Opus: OPUS PRO v9.6
OS: Windows 8 x64
did you see the project that i have sent, "EDAViewer"?


For this message JATBorges has been thanked by : mackavi


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 24 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group