Click to See Complete Forum and Search --> : Hello all - just thought I'd introduce myself!
christillis
07-19-2008, 03:49 PM
Hi all,
After doing IT for most of my life, I've decided to enter the unknown world of db's! If I ask any stupid questions, at the very least please write back, "that's a stupid question!".
Thanks in advance!
Chris
dougal85
07-19-2008, 10:32 PM
Hi....
Hold on, you've been doing IT all your life and you've not used databases?
christillis
07-20-2008, 08:04 AM
Hi Doug,
Yeah would you believe it eh! Of course I've had some databases, but on very basic level such as spreadsheets, etc. But I've never administrated a real online one myself.
Primarily I've been involved with hard/software installation, repairs and network solutions for small biz and residential use.
Cheers!
Chris
dougal85
07-20-2008, 08:06 AM
I see. That makes more sense. Do are you planning on getting into web development?
We are all about the databases!
christillis
07-20-2008, 10:03 AM
glad it makes sense now!
Yeah i'm hoping to get into databases, there are so many uses for them - and i'm one of those people who hates unnecessary replication!
Let the bad scripting commence! :-D
bpat1434
07-20-2008, 12:39 PM
There's never a stupid question, just an unanswered one ;)
Welcome, and good luck :)
christillis
07-21-2008, 11:07 AM
:evilgrin: you've got that right!
Thanks for the warm welcome.
You'll be pleased to know I've developed a new strategy for learning - rather than assume within a few days I'll be able to do productive and useful things...I'm just gonna learn my "Teach yourself SQL" manual fully and ignore useful stuff until I'm fully informed! I'm already getting used to writing 'select' lol!
The only difficulty I have is accidentally using a '£' symbol instead of a '$', but I'll get used to it!
As a side note (and going beyond my comfortable knowledge area), I noticed this script that I customised. I'm just a little confused by the odd bracket I've highlighted...I always thought brackets are closed eventually?:
<?
mysql_connect("localhost", "user", "pword") or die(mysql_error());
mysql_select_db("dbname") or die(mysql_error());
$query = "SELECT * FROM staff";
$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($result)){
echo $row['surname']." - ".$row['staffid'];
echo "<br/>";
}
?>
Just a curiousity really!
NogDog
07-21-2008, 11:18 AM
The indicated brackets (parentheses to us Yanks) are closed - by the immediately following closing brackets.
function_name() simply indicates that you are calling a function which has no arguments. Without the parentheses, the PHP parser would interpret just function_name to be a constant instead of a function.
bpat1434
07-21-2008, 11:34 AM
Do note that there are multiple ways of writing that. Some coders prefer:
myFunction();
which is the typical way, while others prefer:
myFunction( );
which is the same thing, and finally, some even like:
myFunction(null);
although that's not seen much. But just because a function doesn't declare it needs any parameters doesn't mean you can't send one (like null, or an empty string, or whatever). It just means it won't be used ;)
christillis
07-21-2008, 11:54 AM
Hi Nogdog and bpat!
Thanks for the incredibly informative response, I should have seen that it was closed.
Really kind of you both to explain...I'll ensure I take a double look next time. ;)
Oh well, back to the basic stuff! :bemused:
PHP Builder
Copyright WebMediaBrands Inc. All Rights Reserved.