Monday, December 15, 2008

Wow. that was fantastically frustrating.

I tried to see if Western's homepage servers would allow PHP, and of course, they don't. I tried to use their premade functions and tutorials to achieve my needs, and of course the links are nonfunctional and what code they do provide results in an internal server error. How frustrating.

I emailed the help desk, so I'll get a response..probably by February or so. I uploaded the files, less the SQL database file, on my site, but you'll need WAMP server software to do anything with them.

I am currently looking for a new hosting place for my stuff, one that allows mySQL and PHP. Kyle, this is mostly directed to you, but I'd love some help.

Grade Update:

Accounting
Exam: 81.67%
Final Grade: BA

CS 2800
Exam: 81%
Final Grade: TBA

Sunday, December 07, 2008

Oookay. What a mess. My last lab for CIS went actually reasonably well, I'll get around to posting it sometime. I have a ton to do, and not much time to do it. I've actually lost the ambition to post..sorry guys. I'll let you know how my Accounting Exam goes, though.

Thursday, December 04, 2008

I had another stupid mistake. Where I posted before, the column names need to be referenced by 'lastName' and 'firstName' and so on and so forth. Like this:

$row = mysql_fetch_assoc($result);
do {
print("{$row['ID']}");
print("{$row['ISBN']}");
print("{$row['Category']}");
print("{$row['Title']}");
$row = mysql_fetch_assoc($result);
} while($row);
?>
Okay. So, the previous error was actually pretty straightforward. in PHP, concatenation is done by . , so for example, a string with a value (such as what I had before) is done like so:
("stringData".$phpVariable."more string data")
So (fixed in previous post) I needed static references to the columns, which are `firstName` and `lastName`. Now, I have a situation where everything goes through, but my output is not displayed, but it gets the right amount of data entries. Just have to see where I'm screwing up in this tidbit:

$row = mysql_fetch_assoc($result);
do {
print("{$row['`eMail`']}");
print("{$row['`firstName`']}");
print("{$row['`lastName`']}");

$row = mysql_fetch_assoc($result);
} while($row);
?>
Post when I figure it out.

Wednesday, December 03, 2008

So:
extract( $_POST );

// build SELECT query
//NOTE: This is where we're throwing an error, somehow. I think.
$query = ("SELECT `firstName`, `lastName` FROM `users` ORDER BY `lastName` DESC");

// Connect to MySQL
if ( !( $database = mysql_connect("localhost", "root") ) )
die( "Could not connect to database " );

// open Products database
if ( !mysql_select_db( "lab6", $database) )
die( "Could not open 'users' database " );

// query Products database
if ( !( $result = mysql_query( $query, $database ) ) )
{
print( "Could not execute query!
" );
die( mysql_error() . "" );
} // end if

mysql_close( $database );
?>

Now, to many of you, this looks like jibberish. Well, my friends, you are not alone. I can interpret it, but it's quite foreign to me as well. My previous error was at the opening of the users database. I was trying to open `users` when in fact I needed lab6; basically the container of the `users` table. Now, I have an error where commented (sent to my prof, because he humors my idiocy). I'll update if/when I figure it out.
A few thoughts:

My girlfriend's little brother, William, did not get accepted into the Alaska Great Lakes Project. This sucks. He's fourteen years old, has few friends, and has yet to be accepted into a community activity or group in Marshall. He's a smart kid, boy scout, polite, the whole nine. So why, Dale, was he not accepted? I'm quite sure it was nothing I wrote in my page-long recommendation letter for him. It's not his grades. I don't believe he's had any problem with his teachers. It would be nice for Will to be included in something. It's not looking like he'll be going to MHS for high school right now, anyway. Oh well.

My project for CS just isn't happening right now. I really, really have to get it done before tomorrow, and I haven't the foggiest how to do it. I have some obscure error about the sql database not able to open, which is horse shit, because I defined both the database and the table name, rechecked and reloaded the whole thing, and I'm just plain stuck. The exercise is due tomorrow, which is a big component of the assignment due Friday. I have a small stats assignment due tomorrow, as well as some accounting. I have a 3-5 page Russian paper on topic of choice due by next Thursday (?), which is not such a big deal.

I have to bring in my calendar to work to see how many conflicts there are between exams and work. Should be a real treat talking with my boss about it. On the plus side, they're training me on vending, which is like free money..I already know most of what you have to do to be on the vending shift, and while training, the work is minimal. On the downside, I have to have Oaklawn's stupid CBL (computer based learning) modules due by the 15th of December, of which I am 50% complete. At least I can do it at work and get paid for it, though.

Pretty standard issue end-of-semester stress, really. Oh, and I might take Russian in fall '09 as a language. If something happens, I'll take it sooner, but I'm pretty excited right now. Humans are fickle though, so we'll see.

I'd love to hear some comments, hope everyone's doing well.

Tuesday, December 02, 2008

Well, interestingly enough, it has been over three years since I touched this. Thanks for the inspiration, Kyle.

I will not guarantee that I will use this blog, nor that anything I post will be relevant, but might as well give it a shot.

The most interesting thing that has happened lately has been my trying to learn PHP and some mySQL. It's actually pretty tough without much intro. I'm running localhost through Wamp server utility, and I might well post the results if I can manage to figure it out.

Somebody comment if you notice that this exists.