Search found 74 matches
- Tue May 31, 2011 1:33 am
- Forum: PHP
- Topic: select from one table insert to another
- Replies: 7
- Views: 1312
Re: select from one table insert to another
yeah i tried and tried this is a tough one I can get the id and username 1 of them to move but can't get 2 usernames 2 insert
- Mon May 30, 2011 4:49 pm
- Forum: PHP
- Topic: select from one table insert to another
- Replies: 7
- Views: 1312
Re: select from one table insert to another
Thanks did not know that, but this stumps me if no loop then how do I get all my usernames only from table users and insert them into new table matchups in columns username_1 and username_2 tried this and and column count mismatch I know this <?php $localhost = "localhost"; $username = &qu...
- Mon May 30, 2011 3:20 pm
- Forum: PHP
- Topic: select from one table insert to another
- Replies: 7
- Views: 1312
select from one table insert to another
I am making my matchup.php I am trying to take 2 names from one table and insert them to a new table in one row like this now I am unsure what to do I know the foreach is probly incorrect <?php $localhost = "localhost"; $username = "test"; $password = "test"; $database ...
- Sat May 28, 2011 9:27 pm
- Forum: Suggestions
- Topic: IRC?
- Replies: 22
- Views: 8899
Re: IRC?
no one on it
- Tue May 24, 2011 7:44 pm
- Forum: CSS / Styling
- Topic: Best way to post DB results to page
- Replies: 1
- Views: 989
Best way to post DB results to page
I know alot of people say Div's other say tables. I am making my tournament match app and I am wondering what is the best way to display my results. Player1 vs Player2 Score Player_1 10 Score Player_2 6 and this is to be displayed also will list all matches in progress. I want this to look nice on t...
- Tue May 17, 2011 7:46 pm
- Forum: PHP
- Topic: question fuction manipulation
- Replies: 3
- Views: 961
Re: question fuction manipulation
yes it stop the page from change on refresh when I had one or other it keep changing on refresh when I added them both it stops
so if I change them to a differant number and make them match each other it will rotate the database order
so if I change them to a differant number and make them match each other it will rotate the database order
- Tue May 17, 2011 12:01 pm
- Forum: PHP
- Topic: question fuction manipulation
- Replies: 3
- Views: 961
question fuction manipulation
<?php include ( 'dbconnect.php' ); $query = "SELECT `id` , `name` FROM `users`"; $result = mysql_query ( $query ) or die ("<p class=err>Error - Query failed: ".mysql_error()."</p>"); while($row = mysql_fetch_array( $result ) ) { $players[$row['id']] = $row; } srand(214...
- Sun May 15, 2011 6:14 pm
- Forum: Tutorials
- Topic: Populating an Input field.
- Replies: 21
- Views: 4558
Re: Populating an Input field.
I got it I kept checking php sites and php.org and figured $players[1][1]; would echo player name 1 and [2][1] player 2 and so on Thank you all so much. Just curious is there a way to make the [2] be random number 1-20, so the Tournament Bracket would have differnat names ,in differant orders ,every...
- Sat May 14, 2011 3:18 pm
- Forum: Tutorials
- Topic: Populating an Input field.
- Replies: 21
- Views: 4558
Re: Populating an Input field.
You would put them all into an array. while($row = mysql_fetch_array( $result ) ) { $players[$row['id']] = $row; } Now using that how would I replace Player name with a each user from database example of Bracket <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/...
- Sat May 14, 2011 11:26 am
- Forum: Tutorials
- Topic: Issue with mailing list
- Replies: 71
- Views: 12563
Re: Issue with mailing list
I have had this happen before when there was a require that was supposed to be a require_once and this error means that a function is being declared more than once per script execution.I am not sure why, and not having any source script its hard to say.often it is a file included more than once, or ...
- Sat May 14, 2011 4:19 am
- Forum: Tutorials
- Topic: Populating an Input field.
- Replies: 21
- Views: 4558
Re: Populating an Input field.
OK maybe I can make sense, look at this code below <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" cont...
- Sat May 14, 2011 12:38 am
- Forum: Tutorials
- Topic: Populating an Input field.
- Replies: 21
- Views: 4558
Re: Populating an Input field.
You would use LIMIT 1 at the end of the query to make sure only one is displayed. If you want to have control over which one to display as well, you would do something like SELECT `name` FROM `users` WHERE `name` = 'A username' LIMIT 1 That works in limiting the first user in the table, but how do ...
- Fri May 13, 2011 4:09 am
- Forum: General Chat
- Topic: Good Book I picked up today
- Replies: 8
- Views: 1543
Re: Good Book I picked up today
Nice, hope you are enjoying it as well as I am.
- Fri May 13, 2011 4:08 am
- Forum: Tutorials
- Topic: Populating an Input field.
- Replies: 21
- Views: 4558
Re: Populating an Input field.
well if you do $result = mysql_query("SELECT `name` FROM `users`"); while ($row = mysql_fetch_assoc($result)){ echo "<input type=\"text\" name=\"names[]\" value=\"{$row['name']}\" />" } It will output a input box for all of the users in the users ta...
- Fri May 13, 2011 12:38 am
- Forum: Introductions
- Topic: I'm here… let the party begin!
- Replies: 7
- Views: 2079
Re: I'm here… let the party begin!
welcome welcome!
- Thu May 12, 2011 9:41 pm
- Forum: General Chat
- Topic: Good Book I picked up today
- Replies: 8
- Views: 1543
Re: Good Book I picked up today
yeah , that;s copyright infringement. I however do wish it was free, so I could give you all the text.
If you were going to buy a book, I would recomendthis one.
If you were going to buy a book, I would recomendthis one.
- Thu May 12, 2011 7:30 am
- Forum: Introductions
- Topic: Sven is here aswell!
- Replies: 11
- Views: 2614
Re: Sven is here aswell!
Hello, Nice to have ya!
- Thu May 12, 2011 7:29 am
- Forum: Introductions
- Topic: Master
- Replies: 6
- Views: 1757
Re: Master
Welcome to betterphp, enjoy your stay.
- Thu May 12, 2011 7:28 am
- Forum: Introductions
- Topic: Hi
- Replies: 12
- Views: 2768
Re: Hi
Hello, Welcome
- Thu May 12, 2011 7:09 am
- Forum: General Chat
- Topic: Good Book I picked up today
- Replies: 8
- Views: 1543
Good Book I picked up today
PHP and MYSQL Web Developement 4th Edition Luke Welling and Laura Thompson, I am enjoying it. He starts off with real life examples. I think it wasn't till atleast page 10 of chapter 1, he says the imfamous <?php echo "Hello, World"; ?> That was the brief and only time he referenced it. pr...
- Thu May 12, 2011 1:29 am
- Forum: General Chat
- Topic: Longer videos ?
- Replies: 42
- Views: 6826
Re: Longer videos ?
I've seen 6 hour long videos, doubt there is a limit :lol: You could make the parts a little bit longer, I don't mind a 20 minute video but 30+ minutes is to long for me. 20 minute I would say max, it will save you from getting mind lock, when your gettin tired of speaking and talking at the same t...