Jump to content

Phoenix~Fire

Members
  • Posts

    30
  • Joined

  • Last visited

    Never

Contact Methods

  • MSN
    contact@phxshadow.com
  • Website URL
    http://phxshadow.com

Profile Information

  • Gender
    Not Telling
  • Location
    Kimberley B.C. Canada

Phoenix~Fire's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. should use for... not foreach for the second one. and get rid of the $ before 'comedy' and 'horror' and echo $subject; $genres = array ( 'comedy' =>array("Superbad", "Yes Man", "Anchor Man"), 'horror' =>array("Texas Chainsaw Massacre", "People Under The Stairs", "Slither"), );
  2. <iframe src=stream.php></iframe> stream.php ----------> <?php set_time_limit(0); ob_implicit_flush(); for(;{ ... print '<script>' . /*actions*/ . '</script>';} ?> something like that might do the trick too... seems to work fine on every platform I've ever tested it on. otherwise, it's pretty easy to make your own ajax function... look up intro to ajax... and make a recursive call to itself at the end of your if(readyState == 4){ } block...
  3. I love the pretty printer link!! that's pretty sweet... it could come in handy not that MY code's messy... lol
  4. or like u say, just do away with the extra heading... anyways pce
  5. okay nicely done, I think it's reading your initial <?xml as if it was <? or <?php ... you'll probably need to change a server setting or add a .htaccess file to override the setting...
  6. you should probably shouldn't need to do the $action = ($POST)?$POST:$GET; thing... u can just use one or the other most of the time. <?php is more.... acceptable I guess.... some servers don't let you use <?... <div><?php echo $result; ?></div> that should work... <?php print '<div>' . $result . '</div>'; ?> also works... <?php if($result){ ?> <div> <?php print $result; ?> </div> <?php } ?> just play with it, lol You're probably adding the divs in the wrong place if you get that error... T_STRING meaning extra random text that shouldn't be here. use single quotes if you don't have variables or special characters inside it... so like echo 'Hello world'; NOT echo "Hello world"; ... but use echo "HELLO \n WORLD" not echo 'Hello \n World'; and use echo "$result"; not echo '$result'; just echo "it's"; tho single quotes take special characters literally... double quotes take extra processing time, to check for and evaluate special characters... it adds up? eventually :S
  7. I use the .chm documentation from php.net ALL THE TIME... it's pretty awesome... Google "beginners guide to PHP" or something similar, google is your friend. HTML and such languages aren't really... programming.. in my books... well, no more than writing a sentence is programming. So yea start by forgetting everything you think you know and go from there. I might be able to find you lessons if you're interested, just IM me. Peace.
  8. you might just want to save the query result and update it periodically... or save the max(id) from table b the issue here is you are getting rows in table b to the power of table p = number of rows queried overall.
  9. use mysql's SUM() function. I'm pretty sure you cant' use num1 and num2 inside of the statement. SUM(count(table1.*),count(table2.*));
  10. $odds = rand(1,10); if($odds == 1) $out = rand(6,20); else $out = rand(1,5);
  11. Interesting.... I have MAX working just fine using 3 joined tables, as well as count, greater and a whole bunch of other aggrevate functions. Basically I got bored Try: select topics.*,max(posts.post_time) as time from topics left join posts on posts.topic_id=topics.topic_id group by topic.id; Works fine on my DB.
  12. Well, realistically things are only like a couple CPU ticks faster... Your right, things wouldn't be noticeable. However, If you were to run the queries billions of times over you would be saving time. MYSQL_ASSOC means mysql_fetch_array() will NOT index the array... $q = "select * from something"; print_r(mysql_fetch_array($q)); would return Array(0 => 1, 1 => "User", 2 => "password", id => 1, username => "User", password => "password"); print_r(mysql_fetch_array($q,MYSQL_ASSOC)); would return Array(id => 1, username => "User", password => "password"); mysql_fetch_assoc() I believe is the same as using mysql_fetch_array(query,MYSQL_ASSOC)
  13. I hate Dreamweaver Code =) Anyways... what error message are you getting? <?php ('connection.php'); ?> Is that meant to be <?php include('connection.php'); ?>
  14. `leaves.branchID` needs to be `leaves`.`branchID`
×
×
  • 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.