Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - MySQL. . .
  
User name:
Password:
Reply:
 

UserPost
DarkSlaya
Posts: 2591/4249
Originally posted by windwaker
I thought that so many people have/are coding forums


I,too, would've been one of these people if I didn't forget to
upload everything before my last HD format.

But yeah, seems like you'll be getting somewhere with your current work.
windwaker
Posts: 459/1797
I thought that so many people have/are coding forums, that I should try something different.
Xeolord
Posts: 680/3418
Rinternet + Reviewing + Random Polls + Articles = Interesting.

Sounds different.
windwaker
Posts: 458/1797
HOW DARE YOU ASK >(.

It's for an upcoming site of mine. "Rinternet". Just testing to see if most of this works. It's a place where I can review most of the programs I use all the time, and some horrible ones that I'm forced to use. Plus have random polls. And comments for the articles, recent news/reviews, umm... yeah
Xeolord
Posts: 677/3418
What can you expect from "an idiot!"

Kidding WW, of course.

This answered some questions I had also, but I'm curious what's all this for? Your own board or something? Or just messing around?

Don't mind me asking.
DarkSlaya
Posts: 2588/4249
Multiply your numbers by 100 in order to have them in some kind of percentage before using the round() function (or else you'll get either 1 or 0 (or 100 and 0))
windwaker
Posts: 457/1797
ooo, thanks, that's exactly what I needed. What do you mean, having my numbers * 100? o_x
DarkSlaya
Posts: 2586/4249
Something like this would do:
Use the round() function (You should consider having your numbers * 100 ,to make it easier).
windwaker
Posts: 455/1797


Here's a question I have no idea even where to START with...

I successfully added a poll function, and I want to find the percent of each poll thingy . I divided the ammount of votes for each poll by the total votes, though my answers get really long sometimes, like 0.66666666666667. How would I limit the characters in a result like this? (so it would return something like 0.67 or 0.66)
neotransotaku
Posts: 1744/4016
however, if there is something you still don't understand from the manual, then you can still ask
windwaker
Posts: 454/1797
Oh... never did find that reference manual... Thanks all you guys for your help .
neotransotaku
Posts: 1737/4016
I've also noticed that a lot of your question could be answered if you also tried looking a little bit at the reference manual: http://dev.mysql.com/doc/
SyntaxLegend
Posts: 105/222
what do you mean, write to the bigening of a row.

you could update the row

UPDATE table SET id=1, col1='Hi', col2='there!' WHERE id=1;

or somethig else?
windwaker
Posts: 453/1797
ooo, really sweet.

now; how would I add to the beginning of a certain row?
neotransotaku
Posts: 1727/4016
manually write in the id value.

insert into [table] (id, col1, col2) values (45, "zomglol", "boo");
windwaker
Posts: 452/1797
Whoa, I tested those, they all worked.

Thanks guys .

Another question...

how do I add to just specific rows? Like if I wanted to add "zomglol" to row 45, how would I do that?
neotransotaku
Posts: 1723/4016
actually, case doesn't matter when it comes to MySQL keywords... case only matters when it comes to your column names and data.
SyntaxLegend
Posts: 104/222
Originally posted by Rydain
select * from [table] where id between 50 and 100;
select * from [table] where id in (1, 6, 21, 40);
Just clarifying. Would the correct code be set out as:
SELECT * FROM [table] WHERE id BETWEEN 50 AND 100;
and
SELECT * FROM [table] WHERE id NOT IT (1, 6, 21, 40);
Rydain
Posts: 311/738
select * from [table] where id>=50 and id <=100

Or you could

select * from [table] where id between 50 and 100;

SQL has a bunch of other similarly nifty conditionals that are very good to know. in is another good one because it lets you specify a list of values to look for instead of making a ginormous pile of or's. For instance:

select * from [table] where id in (1, 6, 21, 40);

(Conversely, use "not in" to exclude the listed ID's.)
Xkeeper
Posts: -3066/-863
Originally posted by windwaker
Edit: that was a horrible question that didn't need to be answered XD.
...

Yeah, I think he figured it out; all you'd have to do is stick it into a var, stripslash the var, then put the var in.

This is a long thread. Click here to view it.
Acmlm's Board - I2 Archive - Programming - MySQL. . .


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.011 seconds.