5
votes
2answers
260 views

Slight extension for SQL prepared statements syntax. Need advice

In my database abstraction library I am extending SQL prepared statements syntax to hint a parser with expected literal type. I take it as a very essential improvement, my reasoning you can read here. ...
0
votes
1answer
147 views

How exactly can I check for new rows in sql with ajax? [closed]

How do certain services, just like google plus and facebook, check for new content without reloading the page? Whenever you are on any of those websites a new notification of a post related content ...
1
vote
1answer
117 views

Store data for multiple User Type

I am developing an app where four types of user share same module. So is it a good idea to create: one table and user_type and user_id (something like that) table prefixes basically 4 diff tables of ...
3
votes
7answers
811 views

OOP (php) for beginners - some unclarities

I started reading some tutorials about OOP, because I want to learn the basics. I have a question about it. I understand how you can have a object "Car" and give it a color like this ...
4
votes
1answer
284 views

Designing a universal database driver class

I have a homebrew MVC framework that I have been using for a while, and it has been working great, but I am planning an upgrade to it for its ORM classes. So far, it only supports SQL databases by ...
8
votes
4answers
538 views

Should database queries be abstracted out of the page itself?

When writing page generation in PHP, I often find myself writing a set of files littered with database queries. For example, I might have a query to fetch some data about a post directly from the ...
1
vote
2answers
536 views

Registration: Email hash and verifying only one account per email

I'm using a registration function that hashes the email in PBKDF2 with a random and unique Salt each time. The hashes email and his salt are saved in the DB. No problem with that. The problem is that ...
2
votes
2answers
177 views

Better way to search for text in two columns

Here is the scenario. I am making a custom blogging software for my site. I am implementing a search feature. It's not very sophisticated - basically it just takes the search phrase entered and runs ...
2
votes
1answer
436 views

Which would be a better way to load data via ajax

I am using google maps and returning html/lat/long from my MySQL database Currently A user picks a business category e.g; "Video Production". an ajax call is sent to a CodeIgniter controller the ...
5
votes
4answers
1k views

What are the advantages to using SQL query builders?

Are there any advantages to using a query builder, rather than using raw SQL? E.g. $q->select('*') ->from('posts') ->innerJoin('terms', 'post_id') ->where(...) vs: SELECT * FROM ...
5
votes
2answers
2k views

How can I design a model layer without ORM, and when should I use it?

I'm a PHP developer who started with CodeIgniter. In it, designing models was easy: it seemed like each method defined in models was the equivalent of static methods in a normal, objected-oriented ...
0
votes
2answers
341 views

Programming certificates [duplicate]

Possible Duplicate: Are certifications worth it? I'd be glad to hear your opinions on which programming certificates are the most widely recongnized in the industry and how useful are they ...
13
votes
6answers
2k views

Interacting With Data Using Multiple Databases/Servers

All of the projects that I've had to deal with so far have only required a single database on a single server. I'm interested in learning more about how projects that need to scale move to multiple ...
3
votes
3answers
754 views

Why put SQL statement in a variable before using mysql_query()?

I'm been working with PHP on and off for a bit now, and I've seen plenty of code both ways: $sql = "SELECT …"; mysql_query($sql); vs mysql_query("SELECT…"); Is there a reason for separating the ...
0
votes
3answers
109 views

Trying to evaluate answers provided by an online technology school

I've been considering taking some web-related programming courses from an online technology school (it's probably best if I don't name names). When I read the syllabi of the different courses on their ...
7
votes
1answer
523 views

How to document an algorithm properly with sample data?

I am wondering what should an algorithm documentation contain? Can't locate a proper guideline to follow. I have in mind to include summary of the algorithm description of the algorithm flowcharts ...
2
votes
1answer
378 views

Active Record library with support for both SQL and NoSQL?

I'm looking for a PHP Active Record library that supports both SQL and NoSQL drivers (mongodb in particular). It doesn't matter if it actually has the NoSQL driver, I can write it myself, as long as ...
9
votes
6answers
886 views

What kind of Web development projects benefit from using ORM?

I'll start by saying that I've done 95% of my database work using SQL. Recently, I did some investigation of various ORMs, such as NHibernate and Doctrine. I can see the advantages of not needing to ...
11
votes
7answers
911 views

How can I get programmers to stop writing code vulnerable to SQL injection?

Sometimes you get busy and delegate small tasks to junior programmers. But if you don't pay close enough attention you find yourself with this kind of code in production: class DivtoggleController ...
5
votes
1answer
557 views

OpenID implementation - PHP, Javascript, MySQL

I've started doing some research on the technologies that I will need for my website. I'm trying to implement a really simple website with OpenID user registration. The website will store a block of ...
1
vote
3answers
396 views

PHP ORM style of querying

Ok so I have made an ORM library for PHP. It uses syntax like so: *(assume that $business_locations is an array)* Business::type(Business:TYPE_AUTOMOTIVE)-> ...