Search found 74 matches
- Tue May 31, 2011 1:33 am
- Forum: PHP
- Topic: select from one table insert to another
- Replies: 7
- Views: 1047
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: 1047
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 [syntax=php]<?php $localhost = "localhost"; $us...
- Mon May 30, 2011 3:20 pm
- Forum: PHP
- Topic: select from one table insert to another
- Replies: 7
- Views: 1047
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 [syntax=php]<?php $localhost = "localhost"; $username = "test"; $password = "test"...
- Sat May 28, 2011 9:27 pm
- Forum: Suggestions
- Topic: IRC?
- Replies: 22
- Views: 7085
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: 843
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: 771
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: 771
question fuction manipulation
[syntax=php]<?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; ...
- Sun May 15, 2011 6:14 pm
- Forum: Tutorials
- Topic: Populating an Input field.
- Replies: 21
- Views: 3756
Re: Populating an Input field.
I got it I kept checking php sites and php.org and figured [syntax=php]$players[1][1]; [/syntax] 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 d...
- Sat May 14, 2011 3:18 pm
- Forum: Tutorials
- Topic: Populating an Input field.
- Replies: 21
- Views: 3756
Re: Populating an Input field.
You would put them all into an array. [syntax=php] while($row = mysql_fetch_array( $result ) ) { $players[$row['id']] = $row; }[/syntax] Now using that how would I replace Player name with a each user from database example of Bracket [syntax=xhtml]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//...
- Sat May 14, 2011 11:26 am
- Forum: Tutorials
- Topic: Issue with mailing list
- Replies: 71
- Views: 8712
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: 3756
Re: Populating an Input field.
OK maybe I can make sense, look at this code below [syntax=php]<!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-Typ...
- Sat May 14, 2011 12:38 am
- Forum: Tutorials
- Topic: Populating an Input field.
- Replies: 21
- Views: 3756
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 [syntax=sql]SELECT `name` FROM `users` WHERE `name` = 'A username' LIMIT 1[/syntax] That works in limiting the first user in t...
- Fri May 13, 2011 4:09 am
- Forum: General Chat
- Topic: Good Book I picked up today
- Replies: 8
- Views: 1324
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: 3756
Re: Populating an Input field.
well if you do [syntax=php]$result = mysql_query("SELECT `name` FROM `users`"); while ($row = mysql_fetch_assoc($result)){ echo "<input type=\"text\" name=\"names[]\" value=\"{$row['name']}\" />" }[/syntax] It will output a input box for all of the ...
- Fri May 13, 2011 12:38 am
- Forum: Introductions
- Topic: I'm here… let the party begin!
- Replies: 7
- Views: 1660
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: 1324
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: 2198
Re: Sven is here aswell!
Hello, Nice to have ya!
- Thu May 12, 2011 7:29 am
- Forum: Introductions
- Topic: Master
- Replies: 6
- Views: 1397
Re: Master
Welcome to betterphp, enjoy your stay.
- Thu May 12, 2011 7:28 am
- Forum: Introductions
- Topic: Hi
- Replies: 12
- Views: 2287
Re: Hi
Hello, Welcome
- Thu May 12, 2011 7:09 am
- Forum: General Chat
- Topic: Good Book I picked up today
- Replies: 8
- Views: 1324
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 [syntax=php]<?php echo "Hello, World"; ?>[/syntax] That was the brief and only time...
- Thu May 12, 2011 1:29 am
- Forum: General Chat
- Topic: Longer videos ?
- Replies: 42
- Views: 5462
Re: Longer videos ?
I've seen 6 hour long videos, doubt there is a limit 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 time. Y...