Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

Object oriented DB access

Name: Anonymous 2008-12-19 17:04

So I'm doing a very low scale project - just a simple blog/template for a guy. PHP5/MySQL5 on Apache.

I had programmed mostly the entire thing without abstracting the database, since I figured this project would be pretty specific to my clients needs, now however... I'm really liking how this turned out and would like to use the backend for my own personal site.

The problem is my personal site is on Postgre.

So my question is... do I dick around with PEAR::DB (does that project even exist anymore?) - or, do I just go through searching query by query and changing them by hand?

Name: Anonymous 2008-12-19 17:05

switch to mysql you sack of worthless shit

Name: Anonymous 2008-12-19 17:07

PHP5/MySQL5 on Apache.

switch to mysql you sack of worthless shit


what

Also, switch to Python/SQLite on Lighttpd, you sack of worthless shit.

Name: Anonymous 2008-12-19 17:08

he said that his PERSONAL site runs postgre.
I'm assuming he is not his own client...

FUCK PYTHON
SQLite - not for websites...
Lighthttpd - FUCK YEAR!

Name: Anonymous 2008-12-19 17:10

>>3
SQLite
LOL WHAT

Name: Anonymous 2008-12-19 17:12

>>1
Either use PDO or a real programming language. Avoid PEAR-anything, because it's utter crap.

Name: Anonymous 2008-12-19 17:45

>>5
Actually SQLite is genuinely great, but since it doesn't take a few hundred megs of hard disk to install and a few minutes to start up and it doesn't spawn its own processes and shit people don't take it seriously. You know, because it lacks ENTERPRISE.

I've used it with databases well into the hundreds of gigabytes, and guess what? It runs just fine. Performance in databases is a question of:

1. Scalability. If you are going to run on a single machine in a single disk with a single thing hitting the database, this doesn't matter.

2. Actual performance, this is mostly how many times you have to hit the disk per operation. And no matter how much ENTERPRISE you throw at it, it's not going to improve much.

tl;dr: Enjoy your bloated shit, I'll enjoy my 200KB database engine.

Big shit has its place, but then again, if you need big shit, perhaps you should look into something else than MySQL, because MySQL has never been... exactly brilliant, if you know what I mean.

Name: Anonymous 2008-12-19 17:51

Generally speaking, any site that gets fewer than 100K hits/day should work fine with SQLite. The 100K hits/day figure is a conservative estimate, not a hard upper bound. SQLite has been demonstrated to work with 10 times that amount of traffic.
Well, maybe you're right.

Name: Anonymous 2008-12-19 18:04

SQLite also has many features that MySQL blatantly lacks. I shall not be a faggot and list them all, I'll let the people that actually care look up what stuff it can do and let the unwashed masses be blissfully ignorant of its benefits and keep using their lousy excuse for a hideously bloated DBMS, because that's what they would have done anyway.

Name: Anonymous 2008-12-19 18:17

>>9
SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. SQLite is the most widely deployed SQL database engine in the world. The source code for SQLite is in the public domain.

Name: Anonymous 2008-12-19 19:06

I WOULD MASTURBATE VIROUROUSLY OVER SOME PEE OR SCAT PORN. THEN I WOULD MASTURBATE VIROUROUSLY OVER SOME FISTING PORN. THEN I WOULD READ SICP

Name: Anonymous 2008-12-19 19:07

>>3
Switch to Haskell/(SQLite|PostGRES) on Lighttpd.

Name: Anonymous 2008-12-19 19:39

hello im patrick the gingor join my community of haxxors if you payme enough i will give you access to a secret area of /reddit/ ;)

Name: Anonymous 2008-12-19 20:03

>>12
Did you mean: MySQL on w3c jigsaw

Name: Anonymous 2008-12-19 20:31

So lets get this straight.

You have a site on Postgre. You made a new site on MySQL.

First, lets be clear. Both of the RDMSes are shit.

You want to transition from Postgre to MySQL.

While both are shit, it is very clear that Postgre is superior shit to MySQL.

Additionally you want OOP access to the DB, and you want this with PHP.

PHP is not object oriented. It may be able to do some things in an object oriented way, but that does not make it object oriented.

So what you are asking is stupid and misguided. Stop fucking around with this toy shit and step up to the real world of web applications.

You are at the shit tier. You could go mid-shit tier and go with fucking Java and Orcle for fucks sake. Or you could join us up in the God tier and go with .Net and MsSQL sever.

Or if you insist on being a loonix fag you can still .Net on Mono and at a minimum use Postgre for a DB. Then you can run a real IDE like Visual Studio (even on loonix too for free) and stop fucking around with pumped up text editors like Eclipse and that shit. You will also get all the OOP access to your database, even MySQL shit (but don't run that).

Name: Anonymous 2008-12-19 22:19

>>15
Microsoft shill detected.

Name: Anonymous 2008-12-20 0:53

>>15
0/10, tried WAY too hard.

By the third sentence, the troll rating was already off the chart. I'm just going to quote some pearls for future usage. I like it how it starts off as mild trolling (not being able to do OO in php, Postgres being shit) and then it just becomes OFF THE CHARTS trolling (suggesting .NET development on Linux, claiming Oracle is inferior to MSSQL, Eclipse being nothing more than a text editor)

Postgre (...) shit
PHP is not object oriented.
mid-shit tier (...) Orcle [sic]
God tier and go with .Net and MsSQL sever.
you can still .Net on Mono
Then you can run a real IDE like Visual Studio
stop fucking around with pumped up text editors like Eclipse


You sound like PoppaVic's long lost twin brother, same IQ, only a MS fanboy instead of... I have no idea what PoppaVic is.

Name: Anonymous 2008-12-20 20:25

>>17

You really are a fucking idiot. You are one of those fags who thinks they know everything, when in fact you know very little.

The Mono project is .Net on Unix, mainly developed by Novel with support from MS. You didn't even fucking know that. The latest release runs pretty fucking good too.

It is also fucking true that MS SQL > Oracle > Postregre > MySQL.

I am sure your database experience is running a couple related tables and running dynamic SQL queries concatenated from PHP stings. Ohhhh, look at you go girl. You are a fag and doing it wrong.

MS SQL is better than Oracle because it has better features and comes with better tools. It really is that fucking simple.

PHP does try to OOP, but it doesn't fully. Just like you try not to be a fag, but you are anyway.

And yes, Eclipse is shit compared to Visual Studio. Take, for instance, debugging a PHP app vs debugging an ASP.Net app.

Visual Studio:
1. Write app
2. Hit F5

Eclipse:
1. Write app.
2. manually edit your fucking php.ini text file like its 1994.
3. go to the Navigator window and right-click on your PHP project, debugArticle. Select Properties, then click PHP Project Settings. Click Configure Workspace Settings and change localhost appropriately or add the port your Web server is listening on (http://localhost:8080, for example). Click Apply
4. click Run > Debug
5. Select PHP DBG Script on the left-side panel and click New. 6. go to the File tab, and type in your current project, debugArticle, and the file you want to debug
7. go to the Environment tab, then to the Interpreter subtab. Browse for your php.exe file in your PHP install directory
8. click on the Remote Debug subtab, select Remote Debug
9. Set the Remote Source path equal to the absolute path (not the Web path) to the PHP script you're going to test

Eclipse just can't debug shit, you have to fuck around with it for a while to enable that. That is to say that the integration of PHP debugging isn't there, its up to you to do it. That's what makes it a fucking gay ass text editor. Visual Studio is a real IDE, it actually has mechanisms integrated and readily available to do development tasks like debug. Its a fucking INTEGRAATED DEVELOPMENT ENVIRONMENT. If the Development task of debugging is poorly Integrated, then the Environment fucking sucks.

Idiot faggot.

Name: RMS Mark Shuttleworth 2008-12-20 20:32

>>18
That is user subjugating software. It infringes on the user's rights and should therefore be avoided.

Name: Anonymous 2008-12-20 20:35

>>17
PoppaVic.. that brings back unpleasant memories!

Name: Anonymous 2008-12-20 22:29

JAMES I AM VERY DISAPPOINTED THAT YOU WOULD DIVULGE THE DETAILS OF OUR WEB SIGHT PROJECT TO AN INTERNET FORUM YOU HAVE BREACHED OUR CONFIDENTIALITY AGREEMENT WHY ARE YOU ASKING FOR HELP FROM COMPLETE STRANGERS YOU TOLD ME YOU WERE CAPABLE OF DOING THIS PROJECT I PUT FAITH IN YOU I AM GOING TO TERMINATE YOUR CONTRACT AND TELL PEOPLE OF YOUR APPARENT INCOMPETENCE. PLEASE TRANSFER MY DOMAIN BACK TO MY ACCOUNT I WILL HIGHER ANOTHER DEVELOPER THANK YOU, DAVE

Name: Anonymous 2008-12-20 22:36

>>15
10/10, Ron Penton is filling up the cup.

Name: Anonymous 2008-12-21 0:39

>>18
SOLUTION: DON'T WRITE PHP, FAGGOT. THREAD OVER.

Name: Anonymous 2008-12-21 1:30

>>18
Why the fuck are you using Eclipse for PHP? Why the fuck are you using ANY IDE for PHP? Wait, why the fuck are you using PHP to begin with?

And why are you comparing .NET shit + Visual Studio (Visual Studio is tightly integrated with all the crap MS likes to shove down your throat) with PHP + Eclipse (Eclipse was never meant to do PHP and no one with more than two brain cells will use it for that) to prove Eclipse sucks?

This is probably the best troll I've seen in /prog/, it's actually getting a reaction out of me.

Name: Anonymous 2008-12-21 10:02

Can someone explain the Ron Penton filling up the cup thing? TIA.

Name: Anonymous 2008-12-21 11:27

>>24
I FEEL THE ANGER CONTAINED IN YOUR POST RADIATING OUT OF MY FUCKING MONITOR

Name: Anonymous 2008-12-21 11:36

>>15,18
Shove Microsoft up your ass.

(Have I been trolled?)

Name: Anonymous 2008-12-21 11:51

>>25
It's a meme I happen to have invented.
>i
You have:
a Ron Penton Coin
a Coffee mug
some data structures
a copy of SICP
a souvenir photo of
Haskell the dog
>e
You enter Ron Penton's Private Sexy Pleasures. There is a strong smell of smegma in the room.
>l
You are in Ron Penton's Private Sexy Pleasures. You see Ron Penton.
>put coin in Ron Penton
You put the coin in the Ron Penton. Ron Penton notices your data structures and starts peeing in your coffee mug.
>run
You cannot run. Ron Penton is filling the mug.
>PLUGH
You cannot PLUGH. Ron Penton has filled the mug and is staring at your asshole suggestively.
>throw data structures at Ron
You throw several STL structures at Ron Penton. Ron Penton is nonplussed.
>w
You try to go back but shitty collision detection prevents you from doing so. Ron Penton is approaching and licking his LIPS.
>read SICP
You start conjuring the spirits of the computer with your spells. Ron Penton twitches around.
>read SICP
Ron Penton's head has inflated by approximately 350%.
>read SICP
Ron Penton explodes. His guts are all over the wall.
>z
You rest.
>w
Now that your several problems have been solved, you start heading back and take a sip from your mug on the way.
OH SHI-
>b
You vomit out the contents of the mug.
>l
You are standing outside of Ron Penton's Private Sexy Pleasures. There is some piss and saliva on the floor.
>j
You *grab dick* and begin to masturbate, using the piss/saliva solution as a lubricant.
Ohhh, Satori...

Name: Anonymous 2008-12-21 13:29

>>28
But who is Ron Penton, and why does he piss in mugs and hate SICP?

Name: Anonymous 2008-12-21 13:39

>>29
He writes game programming books

Name: Anonymous 2008-12-21 13:41

>>30
How does that play into this meme?

Name: Anonymous 2008-12-21 14:41

About the Author
Ron Penton is an independent programmer with a primary interest in computer games. He began using GW-BASIC in 1989, moved on to Visual Basic 4 in 1995, QBasic in 1996, and learned C++ in 1997. Ron began working on his degree in 1998 at the Rochester Institute of Technology, and is working on completing his Bachelors in Computer Science at the University of Buffalo. Ron contributed a chapter in the book titled Game Programming All in One published by Premier Press.

Data Structures for Game Programming by Anonymous Reader Rating (5 stars)
January 12, 2003: Let me be frank; I HATE DATA STRUCTURES. They are BORING. I'm a sophomore in a Computer Science program, and I've just finished taking a data structures course, and I barely passed it. All college Data Structure books are written for people who like to read extremely boring mathematical proofs, and I can't read that stuff. So, a friend of mine told me to get this book, so I got it on sale, and boy, I am glad. I've bought Prima/Premier books before, and they are usually good, but also disappointing because the first 40% of the book is always an introduction on things like "a complete tutorial on direct3d" or something. Well this book is different: it gets RIGHT TO THE POINT, IMMEDIATELY. The first two chapters are ALL of the intro material (algorithm analysis and templates), then Chapter 3 jumps right into the data structures! Okay, so arrays may seem to be a bit simplistic, so I skipped that chapter at first. The later chapters in the book are more interesting, but then I noticed in a later chapter, a reference to a complex issue in the array chapter (processor caching). So I went back and and re-read that chapter, and WHOA! He literally shows you EVERYTHING there is to know about arrays, even complex stuff like caching that a normal data structures book would never even touch! This book is amazing; and covers TONS of topics. There's no TOC listed at this site yet, so here's a list of what it's got: Arrays, 2D Arrays, 3D Arrays, Bitvectors, Linked Lists, Hash Tables, Stacks, Queues, Recursion, Trees, Binary Trees, Heaps, Minimax trees, Graphs, AI Machines, Data Sorts, Compression Algorithms, Pathfinding (BEST CHAPTER!), and he even goes over the creation of a simple 2D game and complete map editor for it. Every chapter is packed full of diagrams and figures, notes, and demo's. For every major concept, there is a "Graphical Demonstration" on the CD, that shows you how it works! And, for every chapter, there's also one or more "Game Demonstration"s. These show you how to integrate the data structurs into a game! The CD is so awesome that it could practically sell on its own! The bottom line is: this book takes the boring and difficult subject of data structures, and turns them into something anyone can understand, in a fun and exciting way. 5 stars!

Name: Anonymous 2008-12-21 14:48

>>29
The coffee mug is essentially representing Java, onto which Penton is metaphorically urinating. It's Abstract Art Bullshite  which you cannot possibly comprehend.

Name: Anonymous 2008-12-21 15:19

>>32
Haha!

Name: Anonymous 2008-12-21 15:20

Let me be frank; I HATE DATA STRUCTURES. They are BORING.

Name: Anonymous 2008-12-21 16:03

Let me be frank; I HATE DATA STRUCTURES. They are BORING.

Name: Anonymous 2008-12-21 16:33

Let me be frank; I HATE DATA STRUCTURES. They are BORING.

Name: Anonymous 2008-12-21 17:30

>>24

Because if you are not using an IDE, you are a faggot and doing it wrong.

And Zend claims their add-on shit for Eclipse is the premiere PHP IDE. But what would Zend know about PHP.

I am comparing them because its a fair fucking comparison to show just how shitty PHP is and how shitty the shit surrounding PGP is.

And what the fuck is your faggy Visual Studio is tightly integrated shit. Being and INTEGRATED Development Environment, shit better by tightly integrated. Or if you are bitching that you need VS to .Net, then shut your faggy mouth. I watched this MS fag do a demo of ASP.Net MVC using nothing but Python written notepad. An exercise he only did to shut fags like you up.

>>35
>>36
>>37

STFU Frank. No one asked you.

Name: Anonymous 2008-12-21 17:41

>>38
What does Pretty Good Privacy have to do with anything?

Name: Anonymous 2008-12-21 17:42

>>24
You have ENRAGED the novice point-and-click programmer.

Name: Anonymous 2008-12-21 17:44

Wait, isn't the fact that Haskell has error kind of put a wrench in the whole "purity" thing since error does IO?

Name: Anonymous 2008-12-21 17:52

>>41
unsafePerformIO.

Name: Anonymous 2008-12-21 18:01

>>41
It doesn't do IO, it just stops execution.

Name: Bro 2008-12-21 18:06

>>43
Sorry Bro, but it most definitely does do IO, bro, look at this bro:

Prelude> error "lol"
*** Exception: lol


Clearly there is some sort of IO going on bro because I pass it a "lol" string bro and that stuff gets to the outside world bro, which is IMO IO Bro.

Name: Anonymous 2008-12-21 18:08

>>44
If you want you can define error as [code]error = error[/m], so it doesn't any IO.

Name: Anonymous 2008-12-21 18:11

>>24
Nice rant.

The faggot idiots are using Eclipse + PHP how the fuck I know what for, I'm just making a point here.

Name: Anonymous 2008-12-21 18:14

>>44
error raised an exception, then the top level caught it and printed it's message.

Name: Anonymous 2008-12-21 18:14

*its

Name: Anonymous 2008-12-21 19:08

>>48
*** Exception: it's message

Name: Anonymous 2008-12-21 20:56

>>44
0/10

Name: Bro 2008-12-21 21:07

>>50
Bro, why the hate bro?

Name: Anonymous 2010-12-10 11:07

Name: Anonymous 2010-12-17 1:29

Xarn is a bad boyfriend

Name: Anonymous 2011-01-31 19:59

<-- check em dubz

Name: Anonymous 2011-02-04 18:19

Name: Anonymous 2011-02-04 18:47

Name: Anonymous 2013-08-29 21:02

[quote]foo[/quote]

Name: Anonymous 2013-08-29 21:03

[q]f[/q]

Name: Anonymous 2013-08-29 21:03

|f

Don't change these.
Name: Email:
Entire Thread Thread List