GetDotted Domains

Viewing Thread:
"Mysql - Php Tutorials"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Mon 16/05/05 at 22:42
Regular
Posts: 4,279
Does anybody know of any good Mysql - Php tutorials?

The majority I've found are useless.
Tue 17/05/05 at 15:39
Regular
"Lisan al-Gaib"
Posts: 7,093
Freeola wrote:
> This will, of course, simply pull the information in a long list
> rather than in a table etc.
>
> You could therefore set up a table and in each of the columns echo a
> certain field in MySQL for example echo
> $record['fieldtoecho'];


Aha. Wrong table. I read MySQL table -> HTML, not table -> HTML table.
Tue 17/05/05 at 11:43
Regular
Posts: 78
This will, of course, simply pull the information in a long list rather than in a table etc.

You could therefore set up a table and in each of the columns echo a certain field in MySQL for example echo $record['fieldtoecho'];
Tue 17/05/05 at 10:22
Regular
"Lisan al-Gaib"
Posts: 7,093
Nimco wrote:
> >
> $result = mysql_query("SELECT `email` FROM `tbl_name` WHERE
> `username`='Damarus'");
>
> while ($row = mysql_fetch_assoc($result))
> { echo $row['email']; }
>
> ?>

He'll have to connect to the database first?


(Title Here)

$db="";
$link = mysql_connect("localhost");
if (! $link)
die("Couldn't connect to MySQL");
mysql_select_db($db , $link)
or die("Couldn't open $db: ".mysql_error());
$result = mysql_query( "SELECT `email` FROM `tbl_name` WHERE
`username`='Damarus'" )
or die("SELECT Error: ".mysql_error());
$row = mysql_fetch_row($result)){
echo "Email = ".$row['email];
}
mysql_close($link);
?>

Tue 17/05/05 at 10:02
Regular
Posts: 4,279
Thanks Nimco.
Tue 17/05/05 at 01:21
Regular
"NULL"
Posts: 1,384

$result = mysql_query("SELECT `email` FROM `tbl_name` WHERE `username`='Damarus'");

while ($row = mysql_fetch_assoc($result))
{ echo $row['email']; }

?>
Mon 16/05/05 at 23:00
Regular
Posts: 4,279
I've got the basics going. Theres just one thing that's troubling me.

Say I've got a table with username, name, email etc.

And I want to display the username Damarus's email, how would I do this?
Mon 16/05/05 at 22:43
Regular
"Pouch Ape"
Posts: 14,499
http://www.php.net
http://www.kirupa.com

It's totally not difficult - just remember the principals: store, retrieve, manipulate, edit.
Mon 16/05/05 at 22:42
Regular
Posts: 4,279
Does anybody know of any good Mysql - Php tutorials?

The majority I've found are useless.

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Unrivalled services
Freeola has to be one of, if not the best, ISP around as the services they offer seem unrivalled.
Many thanks!!
Registered my website with Freeola Sites on Tuesday. Now have full and comprehensive Google coverage for my site. Great stuff!!
John Shepherd

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre
Feedback Close Feedback

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.