
BK201
Members-
Posts
20 -
Joined
-
Last visited
Never
Everything posted by BK201
-
Hey there guys, I'm trying to select all the rows where a certain ID is: the problem is the query is only returning the first row with the ID. Kinda clueless here, would appreciate any help. "SELECT * FROM players WHERE acc_id = '$acc_id'"; Using mysql_fetch_array() , I only have the first listed row with the account ID in the array but there is about 5 in the table. It's selecting all the data from that first row, and I'm guessing that I'm using the wrong query, I'd really like to avoid writing a loop to go through all these queries as I'm sure there is a way to do it with just a single query.
-
For just music, I much much prefer zunes.
-
The "Topic Solved" button has seemed to disappear.
-
Thanks mate, I'm trying to get a better grasp on JS before I move to JQuery. Maybe I'll just jump right into JQuery.
-
That's my real concern, I know I can prove that I'm the best choice IF I can get an interview. My fear is what you were saying, that employers won't even bother looking because of it just being a certificate. I think I know what I'm going to do. The web certificate is basically obtained while getting your ASS excluding one class. I'll focus on getting the certificate while figuring out which university I want to go to and talor my classes to what I need in order to transfer to the university.
-
I've just recently started school this summer semester, going for my AAS (computer specialist: web programmer track). It is a local community college, that's my only option as of now. The thing that's frustrating me though is about half of the courses required to get this degree, I'm starting to lean toward just getting the certification... Looking for some advice on the matter. My big.. rather pertinent problems with this AAS (64 credit hours): Right now I'm taking some stupid Web Development class teaching me HTML, CSS, and Dreamweaver. I'm enrolled in the summer semester which is an 16 week course in 8 weeks and I'm doing this class with my eyes closed, I literally pop open my book the night before a project is due and finish the whole two weeks worth of assignments in an hour or two. Now that would be fine, but that's the ONLY class on HTML and CSS wtf? I can't to shit with what I'm being taught realistically, I already know the basics. The even bigger problem is there is no course on PHP in this "web programmer" ASS.. The only classes I'd be taking that are really applicable is an INTRO javascript class, and another non-advanced AJAX class. There's database classes I'll be taking which is great, I need those. But yet I have to take visual basic, advanced visual basic, and java, 3 non technical electives, speech, english, etc. Oh and I have to take intro to flash and flash 1 (ok that's fine, but not over advanced PHP, JS, AJAX, ASP.NET, etc. ). I feel like generally this is just a waste of my time, spending these two years and learning majoritarily things I don't need to know, while leaving out the things do. On the other hand, regarding the certification (31 credit hours): It hits on all the points I need to know, with technical electives. I'm really leaning towards getting this instead. My problem is that I'm really concerned that with just this certificate I won't be able to land any jobs. I've taught myself PHP, and become quite good at it. I fully intend to extend my knowledge on my own beyond the scope it seems I can be taught here. But I'm just curious if anyone has any kind of information on these, like do employers actually consider them when hiring; or is it just like a certificate meh.
-
Argh! JS haha. I'm trying to toggle a input box on and off by click. It toggles on, but then it does not toggle back off. Any help is greatly appreciated. function show() { var character_node = document.getElementById("CC"); var name_node = document.getElementById("cn_label"); if (character_node && name_node) { name_node.hidden = ""; } else if (character_node == true && name_node == false) { name_node.hidden = "1"; } } <form name = "Character Creation" action = "scripts/character_creation.php" method = "POST"> <p onClick="show();" id="CC">Create Character</p> <label hidden="1" id="cn_label">Character Name<input type="text" name="name"></label> </form>
-
I'm just learning AJAX/JS and I'm trying to just make a basic, request. As I've found out you get no error messages when writing in JS so that's not helping. Nothing happens when I load the page. Any help is greatly appreciated, I've looked over several resources but I can't seem to figure out whats wrong. test1.html <script language="javascript" type="text/javascript"> <!-- function createRequestObject() { var http; http = (window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP"); return http; } function processResponse() { var response; if (http.readyState == 4) { response = http.responseText; return response; } } function request(a, b) { http.open("GET", "test1.php?figure1=" + a + "&figure2=" + b, true); http.onreadystatechange = processResponse(); http.send(null); } --> </script> createRequestObject(); request(1, 2); document.alert(response); test1.php <?php echo $_GET['figure1'] + $_GET['figure2']; ?>
-
Ugh, thanks for pointing that out.
-
I'm getting unexpected end on line 20, there's no new line at the end of document. From googling I'm pretty sure it has something to do with the parentheses in my math but I can't figure out what, any help is much appreciated. <?php $_SESSION['critical_chance'] = 40; $_SESSION['str'] = 50; $_SESSION['weapon_damage'] = 45; $cirtical_damage = rand(.1, .15); $critical_chance = 10 + $_SESSION['critical_chance']; $physical_damage = ($_SESSION['str'] + $_SESSION['weapon_damage']) *.5 + ($_SESSION['str'] + $_SESSION['weapon_damage']); function getPhysicalDamage() { if (rand(1, 100) <= $critical_chance) { $total_damage = ($physical_damage * $critical_damage) + $physical_damage; return $total_damage; } else { $total_damage = $physical_damage; return $total_damage; } echo getPhysicalDamage(); ?>
-
I'm quite new to SQL, I'm creating a database and I would like to have an id in table B that is tables A's primary key. I'm can't seem to find the command to do this. Thanks guys.
-
I only have a pretty basic understanding of SQL just enough thats gotten me by whenever I needed to use a database for whatever I was writing. I can't seem to find an answer to my specific question via google. I want the value of say column 3 to equal the difference of column 2 - column 1 for every row in the table. I don't have to update a existing database, I'm working on a text-based rpg and working on creating the database.
-
OK I really can't seem to wrap my head around exceptions / why to use them over just normal error handling. So if someone could please explain to me how to properly use them I would be ecstatic. I've been trying to write an exception for a method that executes a query. I'm not really concerned with how to just fix this but to wrap my head around how they work, I would greatly appreciate an example with some explanation. I know if (mysqlerror()) is retarded but it was my last desperate attempt of many before seeking help lol. public function executeQuery() { mysql_query($this->_query); try { if (mysql_error()) { throw new Exception("There was a problem executing creation query"); } } catch (Exception $e) { echo $e->getMessage(); } }
-
Haha true stuff. To be fair though they created the best of the best during the time search, social networking, etc was evolving. There's not going be a search engine anytime soon if ever that can top google. Unless somebody writes code that can query peoples mind haha. Good principle to live by though .
-
Some people want to use a WYSIWYG editor for some reason.. I mean it's good to know, you may be required to use Dreamweaver for a job or something. I'm personally not looking forward to the class I'm taking on it in 2 days, but hey at least I took it in a 4-6 week summer class rather than a 16 week normal semester eh? Lol.
-
Thank you.
-
Maybe I'm just missing something but I'm completely dumbfounded atm.. Parse error: syntax error, unexpected T_CLASS, expecting T_PAAMAYIM_NEKUDOTAYIM <?php static class Items { private $_weapons = array( ["Wood Axe"] => 10 ); private $_armor = array(); private $_shields = array(); private $_helmets = array(); private $_boots = array(); } ?>
-
I highly doubt anyone here is going to make it for you, you should set yourself off learning PHP. Also it's your portfolio hah. I recommend the book PHP & MySQL: the missing manual it's a great starter book.
-
You sure it's not returning $r or just not echoing; echo"Value to return = $r\n";return$r;} That echo's $r not the value of $r, unless you wanted it that way. Also, are you checking for an empty string.. or? In the if statements.
-
Hey there guys, just curious if anyone knows of any good JS tutorials out there. I'm proficient in PHP so I don't need the whole programming 101 mixed within the tutorial. Thanks much. Checking out the site in the sticky as we speak.