Jump to content

Darla

Members
  • Posts

    31
  • Joined

  • Last visited

    Never

Posts posted by Darla

  1. Hello

     

    I am kind of a newbie at ajax. I have a little table displaying some variables, and listbox which triggers the ajax ->javascript->php page. The table displaying the variables is the placeholder (inside a div tag), the table values change upon selecting values here.  The change when selecting from the listbox is displaying an average of the values based on date, when the user enter the page the initial values are displayed.

     

    My problem is when the user select from the listbox the table values change accordingly. But how do I get back to the original content/home of the page? I wish to use the same graphical element/same div tag.

     

    I tried creating a jsscript for going the other way, It worked except that the listbox no longer triggers the ajax..

     

    Darla

  2. Hello

     

    Thanks for tips, but it seems id did not help. Regarding the ALTER TABLE yourtable DEFAULT COLLATE latin1; - do you think this will help? It is stored correct in the database you see, with SØ. It is when I fetch it in php it turns out wrong. Could there be something with

    mysql_fetch_array($result); or something? I have tried utf-8 decoding it but it seems it is not utf-8 code.

  3. Hello

     

    I have a database table where I have some values containing the norwegian special letters æ, ø or å.

     

    Upon fetching them it seems Ø turns into a simple "?":

     

     

    $sql = "SELECT description, count(description) AS count FROM userdata WHERE datetime like '".$datetime."%' GROUP BY description ORDER BY count DESC LIMIT 1";
    $result = mysql_query($sql);
    $descres= mysql_fetch_array($result);
    
    echo "description:" . $descres['description'] ;

     

     

    Here is an example of output - the value should have been "SØ" like it is in the database:

    "description:S�"

     

    Great if someone have some idea why.

     

    Darla

  4. Hello

     

    I have a database with some records, these records have been inserted with a datetime (ex:20070214202701 ). I wish that the user can search for records for a given time or hour for all dates/hours that are in the table. Are there some good calendars where this can be done, or does someone have some other example with for instance dropdowns using php?

     

    Darla

  5. Hello

     

    Just wondering the best way to fetch average values from a table. I wish to fetch both the average age and the most commonly used name from a table which has the fields

     

    age          name

    21            michelle                                       

    15            sean

    22            lisa

    65            michelle

    43            stan

     

    etc.

     

    Anyone have an idea what is the simplest and best way to do this? I guess I can use the AVG-function for the age, but how about the names? (From the above example the name michelle should stand out as the result)

     

    Darla

  6. Hello

     

    I am wondering what is the best method for caching variables or arrays in php (for 3 minutes)? Or is it better to cache the whole page where these variables are? I see there are a few methods out there and I am uncertain what to use. Therefore I am wondering if someone here knows a simple/effective way of doing this as it is kind of a minor application I am building.

     

    Have a nice day!

     

    Darla

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.