bluegman991
Members-
Posts
394 -
Joined
-
Last visited
-
Days Won
2
Content Type
Profiles
Forums
Events
Everything posted by bluegman991
-
That's exactly why I would suggest learning the basics of OO PHP before a fully OO language that you don't even know. OO programming is a lot different than php so i'm just saying, it was easier for me to dive in feet first rather than head first. So it may or may not be easier for you to.
-
I disagree I think php is a good language to learn OO php in first, especially when you already know how to use the language. It doesn't put everything on you at once that a fully oop language would. And as soon as you learned all of the OO aspects of php you can move onto java, visual basic, etc... After learning OO php moving to java and visual basic was a breeze for me.
-
No problem.
-
Well I wish what you were doing was possible. But $IP == $IP1 || $IP2 needs to be $IP == $IP1 || $IP == $IP2 That will fix that part. But it still won't condition right. You will need to place parenthesis around it to tell it what to do first since by default || is higher in authority. Anyway the statement should look like this: if($ir['user_level'] > 1 && ($IP == $IP1 || $IP == $IP2))
-
What does the if statement you are trying to write look like.
-
Yes you can.
-
Well what do you know so far?
-
How to move decimal place to the left on prices
bluegman991 replied to Hendrickson's topic in General Discussion
He doesn't want to change how many decimal places he has. As it says in his post he wants to lower prices by changing decimal places. 10,000.00 -> 100.00 [From his original post] The query for this one would be: UPDATE `tbl` SET `field`=`field`/100 ^^The above moves shifts the decimal 2 places to the left It will change: 9,900.00 -> 99.00 99,000.00 -> 990.00 999,000.00 -> 9,990.00 -
How to move decimal place to the left on prices
bluegman991 replied to Hendrickson's topic in General Discussion
UPDATE `tbl` SET `field`=`field`*10 ^^ to move decimal to right (raises value) UPDATE `tbl` SET `field`=`field`/10 ^^to move decimal to left (lowers value) Just add a zero to the 10 for each decimal place you want to move over. Warning both queries will update all rows in table. Incase that is or is not what you want. -
Returns wrong value.
bluegman991 replied to newttster's topic in MySQL, Oracle, Postgress or other DB
;) No prob. -
Returns wrong value.
bluegman991 replied to newttster's topic in MySQL, Oracle, Postgress or other DB
No it wont. It will output how many of that item he has. He had LIMIT 1. Limit 1 means he is only selecting 1 row. Mysql_num_rows counts how many rows were selected. Therefore mysql_num_rows will always be 1 as long as he has limit set to 1. But each item isn't stored in it's own row, it is stored in the inv_qty field. So he needs to fetch the row first. Then output the field in which inv_qty is stored. YOU HAVE TO CHANGE MYSQL_NUM_ROWS to MYSQL_FETCH_ASSOC. -
Returns wrong value.
bluegman991 replied to newttster's topic in MySQL, Oracle, Postgress or other DB
It is returning 1 because you have "$tabletsone=mysql_num_rows($tablets);". Change this to mysql_fetch_assoc or mysql_fetch_array. $query=mysql_query("SELECT inv_qty FROM inventory WHERE inv_itemid='620' && inv_userid='$userid' LIMIT 1"); $tablets=mysql_fetch_assoc($query); echo "You have $tablets[inv_qty] metal tablets left!"; -
Yea i thought about adding that last parenthesis, but then i said, "Forget it that's one less key I have to hit."
-
Im sure some parts of it work but not all. However there is a special mobile development of jquery which is made in compatibility for ios(i(pod | touch | pad) , andoid, blackberry, bada, windows phone, palm web os, symbian , and Meego http://jquerymobile.com/
-
There is a mysql add on for C#. Mysql with Visual Basic/C#/.NET/Powershell
-
I have finished a cleaner class. What I have now is simply a query compiler (Does not come with DB Class). It is much more cleaner and more organized than this class. If anyone wants it you can msg me and I will send it over. Examples: $qry=new Query('(select | update | insert | delete)'); $qry->table('tbl1');//for joins: $qry->table(array('tbl1' [ ,'tbl2]...)); for table name variables $qry->table(array('varname' => 'tbl1' [ , 'varname2' => 'tbl2'])); $qry->selectFields('*|fieldName'); //for multiple fields $qry->selectFields(array('fieldName' [ , 'fieldName']...)); mysql_query($qry->Compile()); //to execute You can see the rest of the usage when I give you the script
-
This class is a bit un-organized. I rushed it out, and I was also using it to experiment with somethings. So i know some of the code is messed up, un-needed, or not being used. I will release a more organized and easier to use query compiler that supports joining. Could be out today could be out in a few days. I already have it done, I am just testing everything. So it just depends on what kind of errors I run into.
-
What error are you getting?
-
Lol neon also has a connect, disconnect, __construct, and __destruct function.
-
Idk about html5. But I think final css3 standards are released a bit at a time. Because css attributes like "border-radius" and others at first it was like all browsers had their own syntax (-o-border-radius,-moz-border-radius,-webkit-border-radius). But then seemingly around the same time they all support the final "border-radius" attribute and drop support for their custom support.
-
Yes chrome and opera are very good with slow internet connections. As of firefox7 it now uses less resources than chrome. I am still going to stick with chrome though because it takes a while for firefox to fully end it's processes. Causing it to take longer to do other things like shut down computer. Plus chrome still supports more html5 and css3 than firefox.
-
First post updated with the class.
-
O.K. I'll post it up. Just going to have one more look over it and add in explaining comments. Had a look at code igniter's mysql class from what I found you still had to type out queries. I did see Zend_DB though and can say mine is a bit different.
-
No. Brave is for doing crimes. Will is will to do something (like laziness). Max will is what the maximum will a person with that house can have.
-
Exactly. Forgot to mention your the more you train the more your will drops.