How to read in data from MySQL to Authorware?

Hello

I'm reading in my authorware (MySQL) database values, but the best I can do is either true or false.
I would like to be able to get data from the database and return to AW as a string. Does anyone have experience with this? If anyone can lend a hand in this company?

Thanks in advance for your help,

Brad

You'll need some sort of middleware of script, such as PHP or your ASP.
script will need to:

* connect to the database
* query the database
print the query results

I use ReadURL to send variables AW to my PHP script, script recovers
These values and assigns the variables used in the query. Print
results are returned to the ReadURL. You can also use PostURL.

In AW, my code for retrieving information from the database looks like this:

==================
Action: = '? action = getData.
query: = '& student_data_id =' ^ student_data_id
URLString: = db_loc ^ 'retrieve_data.php' ^ action ^ query
queryString: = ReadURL (URLString)
==================

I Specifies an action so that the script can contain code for more than one
the purpose of the trip. My PHP script looks now like the return line (the spirit):

==================

include a script not cached
include (' lib/no_cache.php');

connect to the database
require_once ($_SERVER ['DOCUMENT_ROOT'].)
'/.. (/ php_secure_scripts/check21/mysql_connect.php');

create empty var for the holding of output to send to the Authorware
$output = NULL;

define queries
If ((isset($_GET['action'])) & ($_GET ['action'] == 'login')) {/ / set}
connection request
$salt = get_salt();
$query = "SELECT student_id, first_name, last_name, INST_ID select OF.
students WHERE username = ' {$_GET ['username']} "AND
password = ENCODE ("{$_GET ['password']}', '$salt'");

} else if ((isset($_GET['action'])) & ($_GET ['action'] == 'getUserInfo'))
{/ / set getUserInfo}
$query = "SELECT inst_name, e-mail, student_data_id, active COURSES."
LEFT JOIN students student_data USING (course_id) LEFT JOIN to HELP
(student_id) Using (select INST_ID) WHERE LEFT JOIN institutions
students.student_id = {$_GET ['sid']} AND courses.sku = {$_GET ['SKU']} ";

} else if ((isset($_GET['action'])) & ($_GET ['action'] == 'getData')) {}
query Set getData
$query = "SELECT course_data, quality, increased FROM student_data WHERE."
student_data_id = {$_GET ['student_data_id']} ";

} else {}
Exit();
ECHO '.

No selected query.

";
}

query the database
$result = @mysql_query ($query);

$row = mysql_fetch_array ($result, MYSQL_ASSOC);

foreach ($row as $key-online $value) {}
$output = $output. "&" . $key. "=" . $value;
}

print $output;

Close the database
mysql_close();
?>
==================

The returned data is saved in my AW variable called 'queryString' which
I then analyze in AW. My database connection code is kept in a separate script
in a location on the server that is not available for browsers. The script
also contains a custom function that returns a "germ" for the password
encoding.

If you need a good book to learn PHP & MySQL, I recommend 'PHP and MySQL '.
for dynamic Web Sites"by Larry Ullman.
http://www.Amazon.com/GP/product/0321336577/SR=1-1/QID=1144427020/ref=pd_bbs_1/103-2954060-1860665? % 5Fencoding = UTF8 & s = books

I hope this gets you on your way!

--
_______________________

Paul Swanson
Portland, Oregon, United States
_______________________

"bradsteele" wrote in message
News:e161n1$o76$1@forums. Macromedia.com...
> Hi,.
>
> I'm reading in my authorware (MySQL) database values, but
the
> I am able to get better is true or false.
> I would like to be able to get data from the database and return
for AW

> string. Does anyone have experience with this? If anyone can lend
one
> hand in this company?
>
> Thank you in advance for your help.
>
> Brad
>

Tags: Authorware

Similar Questions

  • How to read the data from a channel named in windows using labview

    Hello

    I need to read the channel named in windows data. The pipe is created by python by another application. This application post permanent data on the pipe. But I don't know how to read data using labview. is it possible to read the data from different application? If possible, how to start?

    Thanks in advance

    concerning

    RJ

    Hi Rolf,.

    It's just, because of driving is not initialized completely, pipe read returns error 42, I added 2 seconds late, then its work perfect.

    Thank you very much.

    Concerning

    RJ

  • How to read the data in a device connected to the usb port

    Is there a class or object, or the piece of code in Java that is comparable to the PDQComm32.ocx and the mscomm32.ocx used in VB6? I need to know how to read the data of a device plugged into the usb port of the BBerry. Is it possible to use the BB to read data from a device via a usb cable?

    I'm new in Java and I'm looking for the opportunity to write a project to read the data in a device with this program that can turn on a BB instead of on a pc.

    Thank you

    Did you watch net.rim.device.api.system.USBPort?

    That's what the doc says:

    Provides access to the USB port of the device.

    Avoid using this class in applications, as it is not portable. On the contrary, if you need to access the USB port, use factory CLDC Connector to serve a connection.

    Rab

  • migration of data from mysql to sql server

    Hi all

    I would like to import the database MySQL in SQL Server 2008 and export MySQL database into a ".sql" file to import data in SQL Server.

    Whenever I try to import data from MySQL, I get the error attached like a screenshot below.

    Please let me know what can be done and how can I import data with all the tables in the order.

    Kind regards

    Shiva

    Please check this answer of the dev, unfortunately migration of Foglight backend database between different types of databases only is not supported

    http://en.community.Dell.com/TechCenter/performance-monitoring/Foglight-administrators/f/4788/t/19559675.aspx#78924

    There are solutions to help you get the same types of a Foglight backend databases

    https://support.quest.com/SolutionDetail.aspx?ID=SOL42249

    Golan

  • I transferred all my info to my new 6 s.  How to clear all data from old 4S?

    I transferred all my info to my new 6 s.  How to clear all data from old 4S?

    Follow the contours of the steps in this Apple Support page:

    What to do before you sell or give away your iPhone, iPad or iPod touch - Apple Support

  • How can I download data from key USB flash to a Windows 7 computer

    I need to transfer some files from my PC to my PC Windows 7 Windows XP using a USB flash key. I've used Windows Easy Transfer to move my files without problem and some programs but did not download some files. I downloaded these files on a USB flash and I can access the files, as long as the stick is pluged. How can I download data from the USB flash on my Windows 7 computer

    Hello

    The following video may help:

    http://www.YouTube.com/watch?v=hrMQh0Xkpvs

    or this article:

    http://www.swarthmore.edu/documents/administration/its/how%20To%20Use%20A%20USB%20Flash%20Drive.PDF

    and here:

    http://TECHTIPS.salon.com/use-USB-flash-drive-transfer-files-PC-Mac-2544.html

    (Mac here can be a PC).

    Good luck.

  • How to read the date and time of a file by labview information

    How to read the date and time of a file by labview information? for example, time created and updated time.

    The similar question had already spoken here (this is the old thread but still seems topical):

    http://forums.NI.com/T5/LabVIEW/file-date-created/TD-p/109836

  • How do I export data from one day to backup disk.

    Hi all

    Here we have a requirement like, we need to download the data from one day to the external drive and we must compire the exported data and the data in the table.
    I googled and I have discovered that using expdp command we can export the table content, but my Question is how do I export data from one day. My table having 2 years of data and I need download the data of only one day.

    expdp scott/tiger@db10g tables = EMP, DEPT = TEST_DIR dumpfile = EMP_DEPT.dmp expdpEMP_DEPT.log = logfile directory

    Can someone tell me how to download data from one day to the table & compare data exported with the data in the table. (I know both exported and data of the table data will be the same that we are downloading data of the actual table, but for tests, I need to know how to compare).


    Thank you
    Sree

    However, I do not understand the scenario but here is a way to compare:
    (1) change the name of the table newly created in another name
    (2) import the exported file once again

    you will have the same data in both tables

  • How can I get data from each associated XMLnode in movieclips separated when you click a line in the combobox

    How can I get data from each associated XMLnode in movieclips separated when you click a line in the combobox?

    A sample of XML is like this:

    <>planter

    < Lauvtre >

    < Botanisk_navn > Acer campestre < / Botanisk_navn >

    < Norsk_navn > Naverlonn < / Norsk_navn >

    Gronn < Farge > < / fan >

    H4 < Herdighet > < / Herdighet >

    < Hoyde > 10-15 m < / Hoyde >

    < / Lauvtre >

    I have a combobox where it shows the botanical name and the Norwegian name. But the rest of the info in movieclips seem separate.

    Someone has an idea how to do this? Can I use the trace function maybe? Here is my AS3 code so far:

    var loader: URLLoader = new URLLoader();

    loader.addEventListener (Event.COMPLETE, onLoaded);

    list.addEventListener (Event.CHANGE, itemChange);

    function itemChange(e:Event):void

    {

    your. Text = list.selectedItem.data;

    TB. Text = list.selectedItem.label;

    }

    var xml;

    function onLoaded(e:Event):void

    {

    XML = new XML (e.target.data);

    var it: XMLList = xml. Planter.Lauvtre;

    for (var i: uint = 0; i < il.length (); i ++)

    {

    list.addItem ({data: it.}) Farge.Text ([i]) + "\n"+ it.» Herdighet.Text ([i]) + "\n" + it. Hoyde.text ([i]),

    label: it. Botanisk_navn. Text() [i] + "\n"+ it.» Norsk_navn. Text() [i]});

    }

    }

    Loader.Load (new URLRequest ("lauvtre.xml"));

    Thank you!

    Rheus.

    I don't know what you're trying to do.  but, if you want to fill one combobox with the botanical names and when one is chosen, the other use of logins:

    var loader: URLLoader = new URLLoader();

    loader.addEventListener (Event.COMPLETE, onLoaded);

    list.addEventListener (Event.CHANGE, itemChange);

    function itemChange(e:Event):void {}

    var selectedObj:Object = a [list.selectedIndex]

    trace (selectedObj ['fan'], selectedObj ['Botanisk'], etc);

    }

    var xml;

    var a: Array = [];

    function onLoaded(e:Event):void {}

    XML = new XML (e.target.data);

    var it: XMLList = xml. Lauvtre;

    for (var i: uint = 0; i

    list.addItem({label:il[i].child('Botanisk_navn').toString()});)

    a [i] = {'Fan': it [i].child('Farge').toString (), 'Herdighet': it [i].child('Herdighet').toString (), "Hoyde": he [i].child('Hoyde').toString (), 'Botanisk':il[i].child('Botanisk_navn').toString(),'Norsk_navn':il[i].child('Norsk_navn').toString()};}

    }

    }

    Loader.Load (new URLRequest ("test.xml"));

  • How to read the data of BLOB and save to the file system

    Hi friends.

    I have called DEMO table there image stored as a BLOB. now my requirement is to know how to read the data of BLOB and saved in the file system. is there a procedure
    to read the blob object and stored in the file system. pls suggest me with an example.
    Thank you

    HI - don't know what version you have, but have a read through this:

    http://www.Oracle-base.com/articles/9i/ExportBlob9i.php

    Hoek link is to import the blobs in the db, it is export, to a file.

  • How to read the data file

    Hello
    I have red the DBW do that beside Scripture, is that correct?

    Thank you

    Jin

    DBWR writing data in data file... hope that the server process reads the data from the data file...

    Kind regards
    Deepak

  • L50-A-19N satellite can not read audio data from multiple sources

    I can't read the audio data from multiple sources. It is very annoying when I have 2 youtube videos, playing, if I start playing something on the media player, there is no sound on media player, it's the same when I have 2 open media players and 1 youtube video playing, youtube video has no sound...
    It disappears when I plug my headphones...

    I already have all the latest drivers, the DTS driver was last updated was in 2014, his day of February of this year...






    25/02/14

    DTS Inc. Windows 8.1 - 64 Bit 1.01.2700

    I don't know if this has the feel, but I had his most recent DTS driver that I found, it is not my laptop model, but they all seem to be the same - v1.1.88.0
    I uninstalled the DTS software and still had the same problem, then it is irrelevant on its driver somehow...






    02/10/15

    Integrated Device Technology Inc. Windows 8.1 - 64 Bit 6.10.6491.0

    Audio driver IDT has more recent release date, but the version of the driver is the same as the 2013 one...
    Why the older drivers of toshiba releaseing as 'NEW '?

    2nd is my Advanced settings speakers, nothing has changed when I disabled "allow applications to take exclusive control of this device.

    Sorry but I don't understand your problem.
    I tested it on my machine and if I start the music on three different sources (YouTube, player, web radio) I can hear all together, but it makes no sense to listen to music from different sources.

    Or how do understand you?

  • Select the list box file and read the data from file

    I can list the files in the folder in the listbox

    1. I want to just list file .txt files

    2. How can I read data from the selected file (.txt)?

    I think that's what you want, enter a model in your list of files vi (for example, *.txt) and then just use File.vi text of reading by using the selected item in the list box (double click on event or value change) and use the starting for the vi records list path.  I have included a crude extract for your pleasure.

  • How to convert string data from the serial port to double?

    Hello!

    I am very new in LabView and attempt to read data from an OHAUS pioneer pa-313 electronic scale via RS232 serial port. I use the VISA. I can read the data and see it as a string to the screen, but when I try to convert it to a double, it is just the integer and decimal numbers have disappeared. Here's the question: what can be the problem? How can I get the decimals as well?

    What is your normal decimal point?. or?

  • How to recover lost data from calendar

    I lost all calendar entries from before June 25 and use this computer in December 2012.   I suspect that it was when I upgraded to Windows 8.1?  How can I recover this data?

    The calendar application is just a "reader", although data shows is always stored online at http://calendar.live.com. This is so that if you buy a new computer (or drop/break/lose yours), you will lose any information: it's all about the Web site ready to synchronize again.

    So go to this link and you should find all your data.

Maybe you are looking for