Jump to content

stefands

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.windlords.com

Profile Information

  • Gender
    Male

stefands's Achievements

Newbie

Newbie (1/5)

0

Reputation

  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. I've read the sticky, other posts concerning this issue, etc. I'm passed the "header already sent" warnings and all that... but the redirect still doesn't work. The php code is above my <html>, checked if the condition statement is true etc? Any advise? [code] $total = 0 if ($total = 0){ header("Location: newsearch.php"); }[/code]
  5. [code]$blah = 1; if ($blah == 1) {    // example 1: redirect to new page    header('Location: newpage.php'); exit; [/code] The redirect doesn't work. How can I break out of an if/elseif statement and go to an other page?
  6. 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] :-\
  7. Is this [code]$sel = new baaSelect();[/code] etc. and [code]$sel2 = new baaSelect();[/code] and so on? Sorry, I'm not into the jargon yet...
  8. Thank you so much Barand, that works great! ;D  ;D Hmm, I don't want to be pushing my luck here, but can you create 2 series of drop-downs on the same page? I could then use separate submit buttons for each group to define the resulting query... and save me an extra web page.
  9. First off: "baaselect" rocks!!  ;D One question: How do you create 3 drop-downs from that code? That would really make my day!!  ;D ;)
  10. This feature interests me. Is it as simple as (?): [code]<a href="javascript:history.back()">back</a>[/code] From what I gather this can cause problems, how is this? Many thx!
  11. Wackamoly, you're tha man!!!  ;D That works! Thx a lot  8)
  12. 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"?
  13. 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.