×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    5

    Displaying WML over multiple cards from MYSQL

    Displaying WML over multiple cards from MYSQL -Please help
    The line at the bottom <<<....">....>>> the $pagenext phrase will not work. I can get similar PHP to work in HDML and HTML. I just can't figure out what's wrong. Any help would be greatly appreciated!Thanks.Bill billy.wilson@rogers.com

    <?php header("content-type:text/vnd.wap.wml" ?>
    <?php print '<?xml version="1.0"?>'; ?>
    <?php print '<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"'; ?>
    <?php print '"http://www.wapforum.org/DTD/wml_1.1.xml">'; ?>

    <wml>
    <card id="card1" title="XXXXXXX">
    <p mode="nowrap">


    <?php
    $connection = mysql_connect("localhost",
    "XXXXX", "XXXXXX&quotor die ("Couldn't connect to database"

    $db = mysql_select_db("a0012290&quot or die ("Couldn't select DB"


    $limit = 5;
    $sqlcount= "SELECT ROWA, ROWB, City FROM EXAMPLETABLE WHERE City='$city' ORDER BY ROWA";

    $sql_countresult = mysql_query($sqlcount, $connection) or die ("Couldn't execute query"
    $totalrows = mysql_num_rows($sql_countresult);

    if(empty($page)){
    $page = 1;
    }

    $limitvalue1 = $page*$limit-($limit);
    $sql = "SELECT ROWA, ROWB, City FROM EXAMPLETABLE WHERE City='$city' ORDER BY ROWA LIMIT $limitvalue1, $limit";
    $sql_result = mysql_query($sql, $connection) or die ("Couldn't execute query"

    while ( $row = mysql_fetch_array($sql_result) ) {
    echo("<a href='wtai://wp/mc;" . $row["ROWB"] . "'>"
    echo("" . $row["ROWA"] . " "
    echo("" . $row["ROWB"] . "</a><br/>"

    }
    echo "</p>";


    if(($totalrows-($limit*$page)) > 0){
    $pagenext = $page+1;
    echo "<do type=\"accept\" label=\"more\" name=\"more\"><go href=\"EXAMPLE.php?city=$city&page=$pagenext\"></go></do>"; // if the totalrows - $limit * $page is > 0 (meaning there is a remainder), leave the next button.
    }


    mysql_free_result($sql_result);
    mysql_close($connection);
    ?>
    </card>
    </wml>

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    466

    RE: Displaying WML over multiple cards from MYSQL

    Hi!

    Try using "&" instead of &.

    Best regards,
    Forum Nokia Developer Support

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×