get list from a SQL database and create links to each lines in AS3

I'm doing an AIR application with these conditions:

I have a SQL database. In my table, there is a column 'categories' (with different categories (computer, books... etc.)).

enter image description here

In my AS3, I managed to recover "theDescription" when the user select a category. With the URLMethod and a php file.

   // create SQL $sql = "SELECT * FROM annonces where categorie = '$categorie'";

$sql_result = mysql_query($sql, $connection) or die ("Couldn't execute query.");

$num = mysql_numrows($sql_result); $phptheDescription = "";

$counter = 0;

while ($row = mysql_fetch_array($sql_result)) {

$theDescription = $row["theDescription"];

$phptheDescription = $theDescription;

}

echo  "phptheDescription=" . $theDescription;

So my AS3 code retrieves the $phptheDescription since php and displays in a output_txt .

Problem: in my output_txt , a 'theDescription"appears. But I have TWO Articles in the category 'Computers' (and I have 100 points in the same categories).

How do I show all the "theDescription' that are in the same categories?

Ex: If I choose "Computer", it should display "a Surface Pro 3" and "An IMAC". But it only shows the last element "IMAC".

And, after that, it is possible to create "links" for each item posted?

Here are 2 videos of short films (20 sec) explaining my problems:

https://vid.me/DS2r

http://sendvid.com/6iesrygk

THX

Hi-I've never used PHP so I could be wrong here - but it seems to me you're a loop in the records, each time as reset $theDescription to all that is in the current (rather than accumulate output) record. If you are effctively echo only the last record in the query.

I think you should be either running the command echo inside your loop, or alternatively the concatenation of a string inside the loop and then echoing the end of the loop?

I would be likely to generate XML data in PHP (just by concatenating strings) and then use it in my AS3 code.

Tags: Adobe AIR

Similar Questions

  • currently still have PP CS5.5 & want to install on another office, understand that I can only use one at a time. don't have a CD, can I get information from the current installation and a link to download PP CS5.5?

    currently still have PP CS5.5 & want to install on another office, understand that I can only use one at a time. don't have a CD, can I get information from the current installation and a link to download PP CS5.5?

    Download & install instructions https://forums.adobe.com/thread/2003339 can help

    -includes a link to access a page to download the Adobe programs if you do not have a disk or drive

    Find your http://helpx.adobe.com/x-productkb/global/find-serial-number.html serial No.

  • Getting milliseconds of DATETIME SQL database Labview

    Hello

    I am trying to extract a timestamp of my MS SQL database and I don't get the milliseconds when I retrieve the data. Does anyone know how to program sql or labview, so I can get the timestamp set. In SQL, I set as datetime2. I'll appreciate any help. Thank you

    It seems that it is a TEEN driver problem, not specific to LabVIEW.  If you use the query

    SELECT Convert(varchar,Start_Test_Time,21) FROM Engine_Tests

    You can retrieve data in a string and convert it into a timestamp.

    You can also use

    SELECT DATEPART (msStart_Test_Time) FROM Engine_Tests

    to get just the part ms.  More information about DATEPART can be found here:

    http://msdn.Microsoft.com/en-us/library/ms174420 (SQL.90) .aspx

  • Can alerts be attracted on Foglight from a SQL database?

    Hello

    We have a building management system which alerts to high temperatures, the failures of UPS, etc. We would like to be able to feed these alerts Foglight. I understand that we can use the cartridge for SNMP integration to pull in alerts to third-party systems Foglight. However, it will not work with our BMS system because we have SNMP on the ethernet module. This only will give us status, such as up/down of the ethernet module and no alerts we are looking for.

    Is there another way we can get these alerts of our BMS system in Foglight? In my view, there is a SQL database connected to this system that stores the alarm so I was wondering if it would be possible to run a query and extract these alarms in Foglight?

    If someone has done something lilke this before or has any ideas on how I can accomplish this I'd love to hear them.

    Thank you

    Tony

    Hi Tony,.

    If the building management system does not have the ability to send SNMP traps to Foglight, then the best bet may be a collection defined by the user using the appropriate DB cartridge.

    Here is some information:

    http://communities.quest.com/docs/doc-14616

    And how to create rules for these collections:

    http://en.community.Dell.com/TechCenter/performance-monitoring/Foglight-for-databases/m/DB-downloads/20438422

    I hope this helps.

    -Marcel

  • Allow to comment and create links from URLS (JS, Acrobat Pro)

    I need to change the parameters of the PDF format to enable comments and Annotation, and then create links to the URL of the document.  I can do it manually, but I don't see where these properties can be adjusted with Javascript.

    Help, please!

    None of these measures can be done with JS.

    Well, you can convert URLS into links, but it requires a complex script.

  • How can I order a list first for the year and sort the months each year?

    Hello

    I created a report that lists a number of items grouped by month, although elements it since 2012 so together and you spend your order is strange because the groups to report on 2 months.

    example:

    2013 - 01-50

    01/2012 - 56

    02/2013 - 45

    02/2012 - 54

    .

    .

    .

    How do I ordernar first a year and and sort the months each year?

    Sort by DATE... not VARCHAR2

    It is a thing of database, not an APEX.

    In your select statement to the report, the column for DATE information must be one data type DATE or another...

    MK

    PS - TRUNC (a_date_column, 'MONTH')

  • Database and Vcenter linked mode

    Hi all

    I will install 2 Vcenter linked mode, each with him ' s have a local database, on a production site, and another at the recovery site.

    Question: should I make some considerations about the database? I mean, providing that I use the same version of server db on the two sites, do I have to consider other issues? When the production site goes down, I'll be able to use the Vcenter in the DR site with no problems?

    Thank you

    Angelo

    .. just to add a little.  All related attributes is a unique management point only reading.  All instances of vCenter must always be administered separately.

  • Hot SvMotion from large SQL databases

    Greetings,

    I had a few questions about the svMotion from a large SQL server VM. The vmdk is around 2 TB. The svMotion will take about 10 hours. I believe that, according to the white paper on the functioning of vMotion, the current state of the virtual machine is captured as the system changes during the virtual machine through a bitmap file.

    I just believe in the magic that is vMotion, but wanted to get a better understanding of what is happening under the hood.

    1. What is this bitmap file, and where changes are stored?

    2 - How is taken the vMotion and bitmap copy? Is it mainly a backup copy of the point in time of the VM/storage with incremental backups of the full backup once the vMotion starts? All of the incremental backup is then applied to the full backup once the VM/storage arrives at its destination?

    3. is there the _any_ loss of any SQL transaction on this 10-hour period?

    4. If there is no transaction drops, hash verification fails, etc. - how VMware detects and corect these errors?

    5. is there something that is regarded as too massive for vMotion live? An example might be a SQL Server with 8 GB of ram, 4 vcPU with 2 TB of data making 600 IOPS / s.

    6 - vMotion is possible on a WAN? If so, what are the requirements of speed and latency?

    Thank you in advance for your help!

    Tony

    Welcome to the community-

    1. What is this bitmap file, and where changes are stored?

    For vmorion there is no bitmap file - the machine is suspended in memory is copied to the target host and the virtual computer is started on the target host.

    With Storage vMotion - snapshot comes from the virtual disk, which means that the real virtual disk writes are redirected to a snapshot file that records the delta changes to the virtual disk

    2 - How is taken the vMotion and bitmap copy? Is it mainly a backup copy of the point in time of the VM/storage with incremental backups of the full backup once the vMotion starts? All of the incremental backup is then applied to the full backup once the VM/storage arrives at its destination?

    As I said vMotion does not bitmap - while Storage vMotion creates a snapshot of the virtual that saves any changes made on the disc - it took not the backup drive

    3. is there the _any_ loss of any SQL transaction on this 10-hour period?

    NO.

    4. If there is no transaction drops, hash verification fails, etc. - how VMware detects and corect these errors?

    VMware does not check for those I know.

    5. is there something that is regarded as too massive for vMotion live? An example might be a SQL Server with 8 GB of ram, 4 vcPU with 2 TB of data making 600 IOPS / s.

    For vMotion and SvMotion is as far as I know - the issue you are having with SvMotion and high IOPS / s is the Christ of the snapshot file.

    6 - vMotion is possible on a WAN? If so, what are the requirements of speed and latency?

    Yes vMotion can be done on the Wan, but latency requirements are rather tight - 10 ms latency roundtrip with Enterprise Plus -

  • bipublisher Oracle borrowed from a sql database 2005

    Hello

    I am trying to connect to a database of SQL with Oracle BI Publisher 2005 and it fails due to lack of MSSQL jar files - I tried to download them from your site.

    I got the info from the site:

    http://www.databasejournal.com/features/Oracle/article.php/3810266/connecting-Oracle-BI-Publisher-to-SQL-Server.htm

    I found this link on the above site, it asked me to download Jar files on the site below:

    http://www.Microsoft.com/downloads/details.aspx?FamilyId=07287b11-0502-461A-B138-2aa54bfdc03a&displaylang=en

    Here's the Jar are files I got the below:

    § sqljdbc4.jar

    § sqljdbc.jar

    And jar files required for me to be able to connect to the DB SQL are:

    § msbase.jar

    § msutil.jar

    § mssqlserver.jar

    If possible can you please send the above mentioned Jar files or send me the link from where I can download them.

    Hello

    You will need to either post on the TechNet, or the Oracle support help page.

    http://social.msdn.Microsoft.com/forums/en/category/SQLServer/

  • I have 2 laptops. I get messages from Microsoft WIN 10 and 365 personal Office located on the Sony. They are not. Technician?

    My Sony is no longer functional. I need Microsoft to fix. I don't have any idea what went wrong.

    Hello

     
     
    Please contact Microsoft Community.
     
    Please confirm some additional information to help you better:
     
    1. What is the exact message that you get from Microsoft. ?
     
    2 is installed on two laptops to windows 10. ?
     

    3 is it these laptops synced with one player. ?

    Office 365 family working on 5PCs/Macs more Tablet/iPad
     
    You can advise to refer; Secure devices FAQ
     
     
    He wants to withdraw from the Sony computer in his Office 365 subscription list to do this. It can remove the device by logging on the Microsoft account and remove unwanted registered devices list.
     
     
    Get back to us with this information and we will be happy to help you further.
     
    Kind regards
    Anusha
  • read data from a SQL database

    Hi all

    who can I load data from a database, based on a specific query and data in a string or an integer in cascades please give example

    Thank you

    for example first element of data

    // dd
    data[0].dd
    data[0].mm
    etc...
    

    If you put the data to GroupDataModel for example. Then you can access it with ListItemComponent like this:

    ListItemData.dd
    ListItemData.mm
    etc...
    
  • Retrieve data from PL/SQL block and generate the UNIX data file

    Hi all

    I comply the following Unix Shell Script code block. The following code was generated the file count_curdate.txt with all need info. The query gives the number of records, the partition_dt group

    ABC ='sqlplus-s < < of folklore > count_curdate.txt
    uname/paswd@ConnectString
    SET THE OFF POSITION;
    SELECT COUNT (*) | «, » || partition_dt of the XYZ group by partition_dt;
    "exit";
    END '

    But now I need to change the above code to use dbms_application_info.set_module in it. Could someone let me know how to generate the file using PL/SQL in Shell Script block. I have tried following written code, but it generates count_curdate.txt file with 0 bytes.

    ABC ='sqlplus-s < < of folklore > count_curdate.txt
    uname/paswd@ConnectString
    Set serveroutput on;
    SET THE OFF POSITION;
    Set feedback off;
    BEGIN
    DBMS_APPLICATION_INFO.set_module (' shm.ksh ',' get account per day ");
    FOR again IN (SELECT COUNT (*):) «, » || partition_dt as 'DCount"of the XYZ of partition_dt group);
    LOOP
    DBMS_OUTPUT. Put_line (reccur. DCount);
    END LOOP;
    end;
    /
    "exit";
    END '

    Hello, your PL/SQL is not successfully completed, i.e.,.

    This:

    ABC=`sqlplus -s < count_curdate.txt
    uname/paswd@connectstring
    set serveroutput on;
    SET HEADING OFF;
    set feedback off;
    BEGIN
    dbms_application_info.set_module ('shm.ksh','get count by day');
    FOR reccur IN (SELECT COUNT(*)||','||partition_dt as "dcount" from XYZ group by partition_dt);
    LOOP
    DBMS_OUTPUT.PUT_LINE(reccur.dcount);
    END LOOP;
    end;
    /
    exit;
    END`
    

    Should be this:

    ABC=`sqlplus -s < count_curdate.txt
    uname/paswd@connectstring
    set serveroutput on;
    SET HEADING OFF;
    set feedback off;
    BEGIN
    dbms_application_info.set_module ('shm.ksh','get count by day');
    FOR reccur IN (SELECT COUNT(*)||','||partition_dt as "dcount" from XYZ group by partition_dt);
    LOOP
    DBMS_OUTPUT.PUT_LINE(reccur.dcount);
    END LOOP;
    end;
    /
    exit;
    EOF`
    
  • Contact email list - I would only the contacts listed from A to Z by last names of each contact

    I need help in the listing of my Email from A to Z contacts according to their surnames.  Thank you

    Using Outlook Express? Open the address book and assuming you have the names in the family name field, discovered | Sort by | Family name.

    Bruce Hagen
    MS - MVP October 1, 2004 ~ September 30, 2010
    Imperial Beach, CA

  • Search text and create link to another PDF

    Hi all

    I need to know if the following is possible with Javascript or VBA...

    -Open a PDF file

    -Find all text that starts with a specific set of characters (let's say in this case 1 M-')

    -For each found text, select the whole word (not just 1) - and...

    -Highlight or change its color

    -create a link to another PDF file. (the other PDF will have the name of the selected text).

    -Save the PDF file and close it.

    I've already started using VBA, but I'm not an "expert" Programmer

    Thank you

    Marc

    No, it can be done with pure JavaScript that runs inside Acrobat NOT in an HTML page (for security reasons).  He has not, however, being in a PDF file - you do it in a "batch" in Acrobat.

  • The letter 'a' becomes separated from its associated Word and is placed on a line separate from his own. For example, I opened my Firefox home page and ther I my BT mail alerts. It spreads as described previously. All comments patches?

    See above question

    I think I found the problem. There is an additional toolbar, my son had downloaded. I uninstalled it and the problems... I think so

Maybe you are looking for

  • Apparent AppleID blocked without reason

    Lately, since about 2 months ago I ve been asked by my Apple devices (my AppleTV or iPhone, or iPod or MacBook for some reason any my Apple Watch doesn´t this message) who will present the password for my AppleID ande rhe when I do there is always a

  • Battery MacBook Pro Mid 2009 problem

    I got a used Macbook Pro Mid 2009 model. Works very well with OS 10.11 but the battery life is bad I think only the runways for 90 min and then it is empty I watched the news, and that's what he said Manufactur: DP DeviceName: bq20z451 Pack lot Code

  • change table 1 d of data for a row to a column

    Hi all This can be a very simple question, but im trying to take two 1 d of data tables, put them in a table and this table to be 1 column so it looks neat in a table. Thank you

  • KB2538242 update keeps of invites me to install it again and again.

    I downloaded and installed the updates as usual, but one of them (update KB2538242), I already installed 6 times, stops of me invites to install it again and again, he will not stop and the download icon doesn't disappear either.Have tried a few thin

  • FACE UNLOCk prblm

    I have updated to 2.3.5 4.0.3 ics on my NEO V. But I can not find face unlock option in my security. HELP PLZ