PHP & MySQL, joining tables

I have a table in my database with the following fields:
user_name
score
points
Some users have 30 scores and others have 5.  What I want to do is create a recordset that will calculate the highest 15 points for each user.  Then count the total scores (either 15 or less) and get an average points.  The only way I have been able to figure anything out is by defining an exact user.  I can't get it to calculate it for each users and create a list.
Any ideas?

I tried both ways and can't get either to work properly.
What do you mean at the end where you say #use the user data here?
I am not to familiar with loops so I am obviously missing something...

Similar Messages

  • MySQL Joining Tables

    I have a MySQL table that contains two user id's, each of a
    different user. I want to make a query that joins that table with
    the user table to fetch the usernames corresponding to both user
    id's. How can this be done?

    "AngryCloud" <[email protected]> wrote in
    message
    news:fgg691$1jt$[email protected]..
    > Sorry, I don't think I explained my question that well.
    Let me rephrase:
    >
    > I have a MySQL table that contains two user id's, each
    of a different
    > user.
    > Each of the id's is in a different column. I want to
    make a query that
    > joins
    > that table with the user table to fetch the usernames
    corresponding to
    > both
    > user id's.
    >
    > Lets say I have a table called Messages. A record in the
    tables shows the
    > Recipient ID is '26' and the Sender ID is '14'. I want
    to create a query
    > that
    > joins that Messages table with the User Data table to
    get the Usernames of
    > each
    > of those users.
    >
    > Just for possible further understand, let me show you an
    example query
    > that
    > does not make sense, but it might help in describing
    what I am trying to
    > achieve.
    >
    > "SELECT messages.recipient_id, messages.sender_id,
    messages.message,
    > user_data.username
    > FROM messages
    > LEFT JOIN user_data ON messages.recipient_id =
    user_data.id
    > LEFT JOIN user_data ON messages.sender_id =
    user_data.id"
    actually this does make sense but you need to apply aliases
    to the tables
    and columns
    SELECT messages.recipient_id, messages.sender_id,
    messages.message,
    recipient_data.username as recipient, sender_data.username
    as sender
    FROM ((messages
    LEFT JOIN user_data AS recipient_data ON
    messages.recipient_id =
    user_data.id)
    LEFT JOIN user_data AS sender_data ON messages.sender_id =
    user_data.id)

  • Conditional content from 2 tables in PHP/MYSQL

    I am developing a site in DWCS4 that has a database with 2 tables: audio and notes.
    The tables contain the following fields:
    AUDIO
    audio_id (ai)
    title (varchar)
    filename (varchar)
    (plus other fields for date, speaker etc)
    NOTES
    notes_id (ai)
    audio_id (int) - foreign key
    title (varchar)
    file_location (varchar)
    (plus other fields for date, author etc)
    I have a page which lists audio files which enables a selection to be made that then leads to a page (audio_detail.php) which has full details of the audio and contains a player (see www.wscnf.org/audio.php).
    Some of these audio files have associated notes and others do not - those that do contain the reference from audio.audio_id in notes.audio_id - if there are no notes then the foreign key defaults to a value of 0.
    I have been asked to amend the audio_detail.php page so that, if there is an associated notes file, a link to that file is shown on the page - what I have in mind is if there are asscoiated notes, a new line appears beneath the player which says "Notes accompanying this audio are available:" followed by a download link. If there are no associated notes then this line does not appear.
    Any assistance on how to achieve this would be most welcome - my knowledge of PHP/MYSQL is fairly basic (but growing!)

    There are several ways to go about this, but the one that comes to mind is to use an outer join to select columns from both tables. The outer join will return results from the main table AUDIO regardless of if there are matching results in NOTES. You can then test the column values in NOTES. If the row has a NULL value in NOTES.notes_id, then there is no associate note for that row. If there is an notes_id value, then you can use conditional logic to display the NOTE details, link to other pages, etc.

  • New PHP/MySQL Connection extension doesn't  show tables.  What's the next step?

    I'm creating Dreamweaver extensions to work with my CMS.
    Since it is already connecting to the MySQL database I'd like
    Dreamweaver to access the same connection without asking the
    developer for the MySQL credentials again. I have created the HTML
    form, the EDML for the connection script, and the JavaScript to
    stitch it together, and I can successfully create connections. The
    connection script looks good but when I try to expand the tables in
    the database window it doesn't post a request to the server and it
    just shows "None". I have a regular PHP MySQL connection on the
    same site which works fine.
    I feel like I'm missing a required next step which would tell
    it how to enumerate tables. It would be ideal if I could plug into
    the existing PHP MySQL code for this.
    I would really appreciate any help and/or pointers!

    "zymsys" <[email protected]> wrote in
    message
    news:fiuho4$ao8$[email protected]..
    > I'm creating Dreamweaver extensions to work with my CMS.
    Since it is
    > already
    > connecting to the MySQL database I'd like Dreamweaver to
    access the same
    > connection without asking the developer for the MySQL
    credentials again.
    > I
    > have created the HTML form, the EDML for the connection
    script, and the
    > JavaScript to stitch it together, and I can successfully
    create
    > connections.
    > The connection script looks good but when I try to
    expand the tables in
    > the
    > database window it doesn't post a request to the server
    and it just shows
    > "None". I have a regular PHP MySQL connection on the
    same site which
    > works
    > fine.
    > I feel like I'm missing a required next step which would
    tell it how to
    > enumerate tables. It would be ideal if I could plug into
    the existing PHP
    > MySQL code for this.
    >
    > I would really appreciate any help and/or pointers!
    Are you using the Database access functions?
    http://livedocs.adobe.com/dreamweaver/8/apiref/07_mmd31.htm
    MMDB.getTables()
    http://livedocs.adobe.com/dreamweaver/8/apiref/07_mmd42.htm
    MMDB.getColumns()
    http://livedocs.adobe.com/dreamweaver/8/apiref/07_mmd34.htm
    Or are your trying to create a new Connection Type for the
    PHP_MySQL_ServerModel or a whole new servermodel alltogether?

  • [PHP MySQL] Relaciones  entre dos tablas

    Como se hace para manejar relaciones en Macromedia
    Dreamweaver CS3
    utilizando PHP y MySQL?

    Hola amigo
    Te dejo un codigo para que estudies.
    Detalalte esto: curso ='".$row_materias['id']."'
    Materias es un juego de registros que imprime un valor. Ese
    valor lo compara
    con lo que esta buscando y da un resultado.
    Me explico. Algo como concatenaciòn o relaciòn de
    tablas.
    Este ejemplo es de un foro.
    Materias es donde estan escritas las preguntas. Solo
    transporto de una
    pagina a otra la id. El juego de registro materias lo toma he
    imprime un
    resultado
    Ese resultado lo emprime en el juego de registro
    master1trabajos_profesor y
    realiza la busqueda.
    Lo dejo. saludos desde Colombia
    mysql_select_db($database_anuack_com, $anuack_com);
    $query_master1trabajos_profesor = "SELECT * FROM
    trabajos_profesor WHERE
    curso ='".$row_materias['id']."' ;
    $master1trabajos_profesor =
    mysql_query($query_master1trabajos_profesor,
    $anuack_com) or die(mysql_error());
    $row_master1trabajos_profesor =
    mysql_fetch_assoc($master1trabajos_profesor);
    $totalRows_master1trabajos_profesor =
    mysql_num_rows($master1trabajos_profesor);
    ----- Original Message -----
    From: "Alejandro" <[email protected]>
    Newsgroups: macromedia.general.espana
    Sent: Thursday, February 14, 2008 4:42 AM
    Subject: [PHP MySQL] Relaciones entre dos tablas
    > Como se hace para manejar relaciones en Macromedia
    Dreamweaver CS3
    > utilizando PHP y MySQL?

  • PHP/mySQL query syntax

    Can I just check I have some of this right? It's fairly
    basic, but just want to check I'm setting about it the right way,
    as I'm new to the coding. (have in the past used Access a lot).
    Basically I have tables for companies and contacts - in a one
    to many relationship, as any given company may have many contacts -
    which as far as I can tell is how you should do this rather than
    have a single contacts table? (normalisation?)
    So if the tables are :
    Companies :
    CompanyID (INT, auto increment)
    Company
    Address
    etc
    Contacts :
    ContactID (INT, auto increment)
    FirstName
    LastName
    etc
    CompanyContacts :
    CompanyID (INT)
    ContactID (INT)
    what should the SQL be for the page to display a company's
    details along with each contact ?
    I thought it might be something fairly simple like :
    SELECT *
    FROM Companies, CompanyContacts, Contacts
    WHERE Company.CompanyID=CompanyContacts.CompanyID
    But the Access flavour query comes out as :
    SELECT *
    FROM ([Companies] INNER JOIN [CompanyContacts] ON
    [Companies].CompanyID = [CompanyContacts].CompanyID) INNER JOIN
    [Contacts] ON [CompanyContacts].ContactID = [Contacts].ContactID;
    If someone could translate the Access flavour query into
    PHP/mySQL flavour that I could use as a reference that would be a
    great help.
    Cheers,
    Iain

    Thanks David.
    Thinking about it, do I even need the interlinking table -
    can I get away with :
    Companies
    CompanyID (primary key)
    Company
    etc
    Contacts
    ContactID (primary key)
    CompanyID (foreign key)
    FirstName
    LastName
    etc
    And have
    SELECT *
    FROM Companies, Contacts
    WHERE Companies.CompanyID = Contacts.CompanyID
    Which would keep it relatively straightforward adding in new
    companies and new contacts using DWs insert record behaviour, ie
    wouldn't have the complication of populating the CompanyContacts
    table?
    Also - I've ordered your book from Amazon this week - so once
    I get this project completed the plan is to work through it and
    firm up some of the stuff I've been doing.
    Iain

  • Can't connect PHP/MySQL 404 error

    Wow, the learning curve is killing me. Yet another challenge. I'm using Dreamweaver CC and this tutorial http://www.adobe.com/devnet/dreamweaver/articles/setup_php.html
    I'm at this step:
    Open comments.php. You must have a PHP page open in the Document window to create a MySQL connection.
    In the Databases panel (choose Window > Databases), click the Plus button on the panel and select MySQL Connection.The MySQL Connection dialog box appears.
    Type connTest as the connection name.
    For the MySQL Server, type localhost.If you are using the MAMP default ports on a Mac, use localhost:8889.
    For the User Name, type phptestuser.
    Type the password you chose for the phptestuser account in the Password field.
    For the Database, type php_test.Note: You don't need to precede the underscore with a backslash here. It was inserted by phpMyAdmin in the previous section (see Figure 20) only because phpMyAdmin uses a query that permits wildcard characters.
    Click Test.Dreamweaver attempts to connect to the database. If the connection fails, do the following:
    Double-check the server name, user name, and password.
    Check the settings for the folder Dreamweaver uses to process dynamic pages (see Specifying a Testing Server for Dreamweaver).
    Verify that the web and MySQL servers are both running.
    Temporarily disable any firewall or security program. If the connection works, you need to configure the security program to permit communication between Dreamweaver and MySQL.
    Click OK. The new connection appears in the Databases panel.
    Expand the connTest connection, and then expand the Tables branch. You'll see the comments table in the database, which you can expand to reveal the details of the table columns (see Figure 23).
    As far as I can tell I have followed this tutorial to the letter.
    As far as I can tell, XAMPP/php mySQL are all running fine, the files are in the correct place and everything should be working. However when I hit test I get a 404 error. (Same error when I hit the select button.)
    The suggested problems on the 404 message are:
    1. There is no testing server running on the server machine.
    Pretty sure the testing server is running. Is there any way to test this, other than to note that xampp is definitely running right now and that I can log into phpMYadmin no problem?
    2. The testing server specified for this site does not map to the http://localhost/php_test/_MMServerScripts/MMHTTPDB.php URL Verify that the URL Prefix maps to the root of the site.
    Ummm...I'm pretty sure I put things where I was told to put them in the tutorial, but I'm lost at this point where I should verify what. A clue here? The files are where they are supposed to be, but maybe I entered something wrong? Except...I'm not sure what that could be or where to find it. Whatever IT is.
    Everything in local files is looking good.
    Thanks for your help!
    PS: Extra points to anyone who figures out how to make copy/pasteable error messages! These buggers are the bane of my life!

    Bgupta, you rock!
    I hope you have copied the "mysql.php" and "MMHTTPDB.php" files from "C:\Users\username\AppData\Roaming\Adobe\Dreamweaver CC\locale\Configuration\Connections\Scripts\PHP_MySQL\_mmDBScripts" to "C:\xampp\htdocs\phptest\_mmServerScripts"
    This was EXACTLY the problem. I checked the tutorial and I couldn't even find where the tutorial said to do this. (If I missed it, let me know where in the tutorial it was, please.)
    Fixed!

  • How to use a MAP whithout join table

    Hello
    I am still evaluating KODO ;-)
    I am using kodo 3.1.2 with an evaluation version
    linux (kernel 2.6)
    SUN JDK 1.4.2_04
    MYSQL MAX 4.0.18 -Max
    IDEA 4.0.3 and ANT 1.5.4 (to be exhaustive)
    I am wondering how to configure the following mapping involving a Map. :
    public class Translation {
    private String locale;
    private String txt;
    public class TranslatableDescription {
    /**Map of Key=locale as String; Value = {@link Translation}*/
    ==> private Map translations = new HashMap(); <==
    public void addATranslation(Translation t){
    translations.put(t.getLocale(), t);
    file package.jdo :
    <?xml version="1.0"?>
    <jdo>
    <package name="data">
    <class name="Translation"/>
    <class name="TranslatableDescription">
    <field name="translations">
    <map key-type="java.lang.String"
    value-type="tutorial.data.Translation"/>
    <extension vendor-name="kodo" key="jdbc-key-size" value="10"/>
    </field>
    </class>
    </package>
    </jdo>
    The default Mapping generate a join table : TRANS_TRANSLATION which works
    fine, but I would like to remove this table by adding a
    colonne in the "TRANSLATION" table containing the JDOID of the
    TRANSLATIONDESCRIPTION owner of this TRANSLATION.
    I have made some try like this one in the mapping file
    <class name="TranslatableDescription">
    <field name="translations">
    <jdbc-field-map type="n-many-map" key-column="LOCALE"
    ref-column.JDOID="OWNERJDOID" table="TRANSLATION0"
    value-column.JDOID="JDOID"/>
    </field>
    The schema generated in my DB is correct but when I try to persist some
    objects I have the following Exception :
    727 INFO [main] kodo.jdbc.JDBC - Using dictionary class
    "kodo.jdbc.sql.MySQLDictionary" (MySQL 4.0.18'-Max' ,MySQL-AB JDBC Driver
    mysql-connector-java-3.0.10-stable ( $Date: 2004/01/13 21:56:18 $,
    $Revision: 1.27.2.33 $ )).
    Exception in thread "main" kodo.util.FatalDataStoreException: Invalid
    argument value, message from server: "Duplicate entry '2' for key 1"
    {prepstmnt 8549963 INSERT INTO TRANSLATION0 (JDOID, LOCALESTR, OWNERJDOID)
    VALUES (?, ?, ?) [reused=0]} [code=1062, state=S1009]
    NestedThrowables:
    com.solarmetric.jdbc.ReportingSQLException: Invalid argument value,
    message from server: "Duplicate entry '2' for key 1" {prepstmnt 8549963
    INSERT INTO TRANSLATION0 (JDOID, LOCALESTR, OWNERJDOID) VALUES (?, ?, ?)
    [reused=0]} [code=1062, state=S1009]
    java.sql.BatchUpdateException: Invalid argument value, message from
    server: "Duplicate entry '2' for key 1"
         at kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:42)
         at kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:24)
         at kodo.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManager.java:594)
         at
    kodo.runtime.DelegatingStoreManager.flush(DelegatingStoreManager.java:152)
         at
    kodo.runtime.PersistenceManagerImpl.flushInternal(PersistenceManagerImpl.java:964)
         at
    kodo.runtime.PersistenceManagerImpl.beforeCompletion(PersistenceManagerImpl.java:813)
         at kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:69)
         at
    kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:542)
         at
    tutorial.CreateTranslatableDescription.main(CreateTranslatableDescription.java:48)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.intellij.rt.execution.application.AppMain.main(Unknown Source)
    I have the feeling that KODO does try to make diffent row in the table
    "TRANSLATION0" for the TRANSLATION and the MAP.
    So, is this kind of mapping supported by KODO and if yes, how can I
    configure it.
    Thank you for your help
    Nicolas

    So, is this kind of mapping supported by KODO and if yes, how can I
    configure it.It is not directly supported. You can fake it using a one-many mapping
    (see thread: Externalizing Map to Collection of PC), but unless you must
    map to an existing schema, it's probably not worth the effort. (Note:
    also there is a bug that actually prevents this from working with 3.1.2;
    the bug is fixed for 3.1.3, but it hasn't been released yet).

  • Show if field is not empty - PHP/MySQL

    Is there a way I can only show bits of a page if a recordset
    has entries in a certain field, automatically hiding the area if
    the field is empty. (PHP/MySQL)
    To put it in real terms, I have loads of products listed in a
    repeating table. If a product has a photo gallery related to it
    there is a 1 entered in 'photos' field, it has a video attached
    here is a 1 entered in 'videos field and likewise for reviews it
    will have a 1 entered in the reviews field.
    What I'd like to have is a photo, video and review icon/link
    in the 'master table' which only appears in the repeated products
    that have a 1 listed in that field and have them not appear at all
    when there is a 0 in the field.
    Can anyone help me figure it out

    ADDT is certainly a great help, as it - among many other
    features - will allow you define whatever page element as
    "show/hide" based on a query result -- for this it´s using a
    so-called "condition builder" which lets you do that without
    coding.
    However you can achieve the same result without needing to
    resort to ADDT -- by using a basic "if" condition that´s
    checking the respective table column for having the value "1"
    stored, and if so, display the page segment
    The following 3 examples should work when replacing the
    sample "queryname" with the query name your page is actually using:
    <?php if ($row_queryname['photos'] == '1') {?>
    display photo icon here
    <?php }?>
    <?php if ($row_queryname['videos'] == '1') {?>
    display video icon here
    <?php }?>
    <?php if ($row_queryname['reviews'] == '1') {?>
    display videos icon here
    <?php }?>

  • Command in php / mysql

    Hello,
    I used to program a lot in ASP, and loved the command
    function.
    However, now that I'm programming in PHP I do not have this
    at my disposal unfortunately.
    How does everyone perform certain actions on forms right
    now?, for example I'm performing an update on a record, but want to
    update all records in the table first by setting a certain field to
    0.
    Any thoughts and ideas / samples are greatly
    appreciated!

    Jasmine2002 wrote:
    > Correct, in ASP however I had the command so I can later
    on easily call up the
    > box and change / add / update my SQL.
    >
    > Do you just write the appropriate PHP for it?, I don't
    really know how to
    > properly write this in conjuction with Dreamweaver.
    I suspect that command is probably a stored procedure.
    Unfortunately,
    stored procedures were added to MySQL only in version 5.0,
    and
    Dreamweaver doesn't support stored procedures in the PHP
    MySQL server
    model. (I've lobbied for support, but it hasn't happened
    yet.)
    Your update is rather unusual, but you should be able to get
    Dreamweaver
    to generate the code for you using the Update Record server
    behavior.
    David Powers, Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Spry accordion with php mysql as data

    Hello
    I`m trying to create a spry accordion where the Labels are pulled from a mysql database table and the Content of that label is pulled from data in the same database. I tried adding first the spry accordion and then created 1 recordset for the labels and a second recordset for the content , then I added a repeat region for the labels DIV and inside this div I added a repeat region for the content.
    Unfortunatly when viewed in the browsers the accordion doesn`t work.
    Can anyone look at the code and tell me where is the mistake.
    Thanks
    <?php require_once('Connections/log.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    mysql_select_db($database_log, $log);
    $query_log_year = "SELECT DISTINCT Year(`23849`.acoff) AS yy FROM `23849` ORDER BY Year(`23849`.acoff)";
    $log_year = mysql_query($query_log_year, $log) or die(mysql_error());
    $row_log_year = mysql_fetch_assoc($log_year);
    $totalRows_log_year = mysql_num_rows($log_year);mysql_select_db($database_log, $log);
    $query_log_year = "SELECT DISTINCT Year(`23849`.acoff) AS yy FROM `23849` ORDER BY Year(`23849`.acoff)";
    $log_year = mysql_query($query_log_year, $log) or die(mysql_error());
    $row_log_year = mysql_fetch_assoc($log_year);
    $totalRows_log_year = mysql_num_rows($log_year);
    $mhour_log_mon = "0";
    if (isset($row_log_year['yy'])) {
      $mhour_log_mon = $row_log_year['yy'];
    mysql_select_db($database_log, $log);
    $query_log_mon = sprintf("SELECT DISTINCT DATE_FORMAT(`23849`.acoff, '%%M') AS mon , DATE_FORMAT(`23849`.acoff, '%%m') AS m , sum(`23849`.ablock) as toth FROM `23849` WHERE YEAR(`23849`.acoff) = %s GROUP BY m ORDER BY m ", GetSQLValueString($mhour_log_mon, "int"));
    $log_mon = mysql_query($query_log_mon, $log) or die(mysql_error());
    $row_log_mon = mysql_fetch_assoc($log_mon);
    $totalRows_log_mon = mysql_num_rows($log_mon);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>testing ajax php mysql</title>
    <script src="SpryAssets/SpryAccordion.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div id="Accordion1" class="Accordion" tabindex="0">
      <div class="AccordionPanel">
        <?php do { ?>
          <div class="AccordionPanelTab"><?php echo $row_log_year['yy']; ?></div>
          <?php } while ($row_log_year = mysql_fetch_assoc($log_year)); ?>
    <div class="AccordionPanelContent">
      <table width="100%" border="0" cellspacing="5" cellpadding="5">
        <?php do { ?>
          <tr>
            <td><?php echo $row_log_mon['mon']; ?></td>
            <td><?php echo $row_log_mon['toth']; ?></td>
          </tr>
          <?php } while ($row_log_mon = mysql_fetch_assoc($log_mon)); ?>
      </table>
    </div>
      </div>
    </div>
    <script type="text/javascript">
    <!--
    var Accordion1 = new Spry.Widget.Accordion("Accordion1");
    //-->
    </script>
    </body>
    </html>
    <?php
    mysql_free_result($log_year);
    mysql_free_result($log_mon);
    ?>

    You only have 1 "AccordianPanel" which contains a list of "AccordianPanelTab" elements, then a list of "AccordianPanelContent" elements.
    You need to have a list of "AccordianPanel" elements, each containing a pair or "AccordianPanelTab" and "AccordianPanelContent" elements.
    HTH,
    Randy

  • PHP MySQL Error Code 500

    May be someone can help me out with this problem.
    I have setup a new site using PHP MySQL and Dreamweaver 8.02.
    Dreamweaver connects to the database but after creating a
    recordset the recordset cannot be used.
    instead Dreamweaver returns:
    HTTP Error Code 500 internal Server Error
    Any help will be much appriciated.
    Jos

    Hello,
    I have also had the same error - namely that whilst I could connect via ftp, upload/download files, and view database tables, any attempt to view of modify recordsets resulted in error 500.
    Having checked other potential causes (e.g. selection/non-selection use of passive FTP setting, enabling of php, etc.), on the back of posts here I contacted my host and asked if if could relate to mod security, as further investigation revealed that the issue only occurred on sites where mod security had not been disabled (I don't like to disable mod security for obvious reasons - and I'm told you can't do that site by site with apache2 anyway).
    After a few false starts, the problem was resolved - with the following response from my host: "The false positives were being generated by "/_mmServerScripts/MMHTTPDB.php" and that is what we've worked around in the rules. As such, any domain on [servername] using that script in the same way shouldn't generate a false-positive moving forward."
    So it seems the answer (assuming your on an apache server of course) may be to modify the rules to allow full access for MMHTTPDB.php.
    I hope that is of help to some.

  • Php/MySQL database insert record issue...

    I have a php page that adds an "order" to a mysql database table (orders). One text field in the form is for tires/wheels. The description of the wheels often includes the " symbol for inches after a number....Everything submits fine, however when I look at the page that displays the orders all the data after the " symbol including the " symbol is gone... DOes anyone have any idea why this may be happening? It is requiring us to return and edit that area repeatedly. Any help is appreciated greatly. Thanks for your time.

    Ok, so just to summarize so I am understanding this correctly.  You have an ordering page for tires/wheels.  A customer places an order for tires/wheels and the data is submitted successfully and this includes a symbol for measurement (in.).  But on another summary page the symbol is returning a blank value.
    If this is correct we need to see:
    - First, the code that is inserting the symbol to the database table in question
    - Second, the query and code where you are printing the data to the screen.

  • PhP/MySQL Horizontal/Vertical Repeat Region

    Hi Guys,
    I'm pretty sure this question would have been asked many times before. If so, first of all my apologies for re-posting this.
    Anyway, what I'm trying to do is create a repeat region that spans for 4 columns and then repeats the rest in rows. For example, if I have 100 records in my table (MySQL), then I want to display this in a table of 4 columns and and 25 rows (in reality, the number of records would be unspecified, of course, but still the records need to be displayed on a 4 column, X row table). For example:
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    name
    comment
    At the moment, I have no issue with displaying the records either horizontally or vertically (explicitly) using the built in "repeat region" behavior. However, where I'm having the problem is with displaying the records in a table as the one I described above.
    I'm using DW CS5 with PhP/MySQL.
    Can I still do this using the built in "repeat region" server behavior, if so how?
    Otherwise, how else could I achieve this (ideally without using any extensions)?
    Thanks in advance for any help and support,
    Cheers

    I'm believe you should be able to modify the repeat region code to do what you want it to do.  With that said we will need 2 things:
    1.  To see the code from the page.
    2.  To know the order of the results is it:
    Horizontal: 1 2 3 4
                    5 6 7 8
    Or Vertical:
    1 5
    2 6
    3 7
    4 8

  • Php mysql math error when using format(somenumber,2)

    osx 10.5.2, php 5.2.5, mysql 5.0.51 (standard leopard desktop os install)
    Select format(myField,2) as someNumber from myTable ...
    returns data i would expect, formatted as you would expect.
    while looping through the data returned i am calculating a running total.
    for numeric values less than 1,000 results are expected. for numbers gt 1000, php seems to want to truncate the value at the comma. 1,111.11 evaluates to 1; 25,000 evaluates to 25.
    If you remove the format() from the sql statement everything works the way you would expect.
    wrapping the value returned in a floatval() had no effect.
    I am posting this on the apple site rather than php/mysql forums on the off chance that this is a mac centric issue. googling the obvious combinations wasn't productive.

    Sounds like a locale issue.
    Many international formats use comma as the decimal separator, not the thousands.
    There are many levels where this could be set. It could be an OS setting (you don't say where you or, or the locale information of your machine (System Preferences -> International -> Format). It could be in PHP (see: http://www.php.net/setlocale ), or it could be in the database (data could be written in a comma-based table).
    It will take a little research to work out where your specific problem lies.

Maybe you are looking for

  • Incorrect Where Clause being set in Master Block

    I got a strange error the other day. I have 2 database blocks in a form and the blocks are based on views. So, lets say Block1 is based on View1 and Block2 is based on View2. Block1 and Block2 are also in a Master Detail relationship. So, Block B1 is

  • Cant Use Distiller  - OffendingCommand Error [9.3.317 Win]

    Every document i try to use distiller with i get the following:- %%[ Error: undefined; OffendingCommand: ÐÏ à¡± á ]%% %%[ Flushing: rest of job (to end-of-file) will be ignored ]%% %%[ Warning: PostScript error. No PDF file produced. ] %% Any clues o

  • Where I can find the user which confirmed the transport

    In SAP you can customize that each transport need to be confirmed by a user before you can transport it to Production. We have this fonfirmation aktiv but and I can see in table TMSQNOTES the user which confirmed but I believe I should see this infor

  • WebEx - Looking to update Toll Free information

    Hello, Currently when initiating an audio conference we have two toll-free numbers mentioned in the template.  One for US the other for Canada.  We also have numbers in UK, China, India etc.  I cannot find where I can edit this information to include

  • Move FTP server - what to watch out for

    Hi, The client is looking at moving the ftp server to another server (another ip address). I know I will need to amend the communication channels to contain the new ip address's. What will need to be done from a basis side? What other things will I n