Jump to content

Prank

Members
  • Posts

    25
  • Joined

  • Last visited

    Never

About Prank

  • Birthday 12/19/1979

Contact Methods

  • MSN
    prank@death-to-mrwhippy.com
  • Website URL
    http://www.skylinesaustralia.com
  • ICQ
    81791900
  • Yahoo
    prizank@yahoo.com.au

Profile Information

  • Gender
    Not Telling
  • Location
    Sydney, AUS

Prank's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Ahh crap, I didnt even pick up on that. Thanks heaps.
  2. Its happening in several places, each with re-written code. The code couldnt be more simple. Heres one example; [code]         $q = "SELECT * FROM cars"; $qr = mysql_query($q) or die(mysql_error()); $r = mysql_fetch_assoc($qr); echo '<strong>Select a link category</strong><br />'; while($r = mysql_fetch_assoc($qr)){ echo '<a href="links.php?do=listlinks&cat='.$r['name'].'">'.$r['name'].'</a><br />'; } // while[/code] Thanks.
  3. Hi Guys, I have a table with 5 records in it, when I select the records (even just using SELECT * FROM cars) it will sometimes retrieve 3 records and sometimes 4, never the whole amount. I have never seen this happen before. If I run the query in phpmyadmin it returns all records. I dont understand how this could happen, the Statement could not be more simple. Anyone know why this could be happening? Christian
  4. Sweet, I'll give that a go, thanks!! :)
  5. [quote author=Crayon Violent link=topic=99267.msg390886#msg390886 date=1151909295] do you want to select all the rows where the value = something? or do you want to select all the information in all of the rows and then be able to manipulate that info with php? [/quote] I dont need to be able to manipulate it as it should be fine in its current state. I just need to select all and then refer to it Thanks!
  6. Hi Guys, I am building a site which is going to utilise a 'settings' table in mysql which will effect the site depending on the value of certain fields.. does that make sense? So, I have a 3 field table (id, name & value). Then the rows would be (for example; 1, is_feature_turned_on, Y). So then a simple if statement will display or hide that feature. Now, what I want to know is, whats the best way to reference these names and values? I could be stupid and simple write a new query for each row that I want to reference (SELECT * FROM settings WHERE name = is_feature_turned_on) but thats silly. I dont know how else I can easily access these values, so I thought I must be able to put them into an array somehow and access them like so (name['is_feature_turned_on']) but I simply cannot get my head around how to do this. It might be really simple and something I have just not yet considered. Anyway, I would greatly appreciate any help at all on this. Thanks in advance, Christian
  7. hmmm, I have no idea. I dont see why it wouldn't be permitted, providing the editting that takes place doesn't make a change to the way the files are called.... but, thats really a guess.
  8. nm, i figured it out.. stupidly simple.
  9. You can write code that is kept in a cache, but thats outside of my knowledge. I know you can build cached templates using things like smarty (http://smarty.php.net)
  10. yep, precisely. Thats why its important to have well written code. Especially on big sites. C
  11. PHP isn't compiled code, so it doesn't need to check for updates. Files will run regardless of their last updates, the Processor doesn't care about updates. The update taking a few seconds could just be your cache loading the file. You should do a CTRL+Refresh when you update the files as it'll grab the latest copy of the file from the server. C
  12. So that would just add a 1 to the variable $count each time its run? Heres my actual code; [a href=\"http://pastebin.com/658997\" target=\"_blank\"]http://pastebin.com/658997[/a] I need to grab the total value of $total and $qty Thanks for your help.
  13. It looks that way. Create a new file called phpinfo.php and in it, put this; [a href=\"http://pastebin.com/658982\" target=\"_blank\"]http://pastebin.com/658982[/a] (click) Then upload that page and view it in a browser, if it just returns text then yeah, no php. But if it displays php information then its all good. Christian
  14. Hi Guys, I am a bit unsure of how to do this, I'd appreciate any help. What I am trying to do is add up a total number as reported by variables, but the problem is that its the same variable.. For eg; [code] while { $total = 3; } [/code] How would I add all the $total's for each instance that the 'while' was run? I hope this makes sense and I am assuming it is an easy answer.. Thanks in advance, Christian
×
×
  • 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.