Jump to content

stefands

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Posts posted by stefands

  1. [quote]See what I mean?  Maybe you meant to sort by region or zip, then by name?
    [/quote]
    :-[ :P you are abso right. I need to get away from my pc is what the problem is... I'm very sorry for being a nuisance. Thx for setting me straight!!  :-X
  2. [tt]
    camp                          | region        | postal
    ------------------------------------------------------------------
    Camping Athens                | Attica         | GR-12136
    Camping Bacchus                | Attica         | GR-19550
    Camping Delphi                | Cent. Greece  | GR-33054
    Camping Enjoy Lichnos          | Epirus        | GR-48060
    Camping Hellas International  | Thessaly      | GR-38500
    Camping Kalami Beach          | Epirus         | GR-46100
    Camping Kokkino Limanaki      | Attica        | GR-19009
    Camping Sikia                  | Thessaly      | GR-38500
    Camping Valtos                | Epirus        | GR-48060
    Chrissa Camping               | Cent. Greece  | GR-33054
    Ionion Beach                  | West Greece    | GR-27050[/tt]
  3. Hello all,

    I've defined an index over 3 columns called "cprgpt" in table "country1". The columns in question being "camp", "region" and "postal". The $wherevar has the dynamic generated WHERE statement.

    [code]$query = "SELECT * FROM country1 $wherevar ORDER BY camp, region, postal LIMIT $offset, $limit"; [/code]

    The output of the SELECT statement provides the data looked for, the problem is that it's only sorted by camp, not followed by the region and then by postal codes. What could be the problem here?


    PS: There is no other index that has "camp" and first key. The primary key index for the table is on another column (campid).
    I've also read the following info:
    [url=http://dev.mysql.com/doc/refman/4.1/en/order-by-optimization.html]http://dev.mysql.com/doc/refman/4.1/en/order-by-optimization.html[/url]
  4. Hello,

    I'd like to open a new php document as the result of a condition check (if/elseif statement). If certain criteria apply during the execution of a search, then a specific file should be loaded. Vars don't need to be passed, no database action needed.
    I tried an echo of the following code, which obviously didn't work  :P ::)
    (just showing the basic html here!)
    [code]<HTML>
    <HEAD>
    <NOSCRIPT>
    <META http-equiv="Refresh" content="0; URL=http://www.mysite.com/noresult.php">
    </NOSCRIPT>
    </HEAD>
    <BODY>
    </BODY>
    </HTML>[/code]

    :-\
  5. When I use "print(get_defined_vars());" I get "Array" as result.

    This is where I use the var:
    $query = "SELECT * FROM greece WHERE campref='$cmpnr'";
    How would I use superglobals here as you say?

    What's more: when I use the syntax "resultone.php?cmpnr=value" then php should automatically  create the variable $cmpnr in "resultone.php" right? I don't get any warnings when using an "echo $cmpnr;" so the variable is created. If php recognises that it must create $cmpnr then why doesn't it add the given value, which in this case is "GR8590"?
  6. Hello all,

    I've searched through the current postings to find a solution for my problem, without result, hence this posting  ::) I'm trying to pass a variable from one page to another. My webhosing company is running PHP 5.0.5 and "register_globals" is set to "on" in my php.ini file.
    This is an example line of code I'm using:

    <a href=\"resultone.php?cmpnr={$row["campref"]}\"><img src=\"../images/icons/moreinfo.gif\" width=\"62\" height=\"17\" border=\"0\" align=\"middle\"></a>

    As an example, the link in the browser looks like so:
    http://www.mywebsite.com/resultone.php?cmpnr=GR8590

    So far so good I though... However, when using the link and checking the newly auto-defined variable $cmpnr in 'resultone.php' - it's empty?? I'd really appreciate any advise on this.
    Thx!
×
×
  • 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.