Search found 240 matches

by lazy_yogi
Tue Oct 12, 2004 7:51 am
Forum: PHP - Theory and Design
Topic: Euclidean question :)
Replies: 2
Views: 2051

haha

It's really not hard .. u can code it in any language
I coded it in a functional language in about 4-5 lines in my first subject at uni
by lazy_yogi
Sat Oct 02, 2004 8:00 am
Forum: PHP - Theory and Design
Topic: validate a opensource CMS
Replies: 4
Views: 2846

eck oscommerce is awful to customise. the code is horrid, as is the display. Everything is tangled together
Dunno about zencart tho
by lazy_yogi
Tue Sep 28, 2004 10:32 am
Forum: PHP - Theory and Design
Topic: PHP Optimization
Replies: 51
Views: 21526

Let's say we have two almost identical apps: one written by Mr Spaghetti and one carefully refactored into lean & mean classes by Mr Oop. Both work, and Mr Spaghetti constantly annoys Mr Oop (who has better things to do) with the latest sightings on the edge of reality from his Hubble telescope...
by lazy_yogi
Thu Sep 09, 2004 7:37 pm
Forum: PHP - Theory and Design
Topic: limit to the size of an array?
Replies: 8
Views: 4301

Listen to Micky G.
Iterators are definitely the way to go.
by lazy_yogi
Thu Sep 09, 2004 7:32 pm
Forum: PHP - Theory and Design
Topic: Advanced Permission Management
Replies: 21
Views: 13930

timvw wrote:meaby http://www.tonymarston.net/php-mysql/ro ... ntrol.html makes it a little clearer? :)
Wow, nice link. Seems a little complex on first pass, but on reading it over, it's a pretty elegant solution
by lazy_yogi
Tue Aug 24, 2004 7:26 am
Forum: Databases
Topic: Help with a query
Replies: 13
Views: 2472

Thanks very much for your help. Works perfectly.
by lazy_yogi
Sat Aug 21, 2004 11:37 am
Forum: PHP - Theory and Design
Topic: OOP and database for business site
Replies: 23
Views: 11448

Just checked it out. Looks good. Any idea why that's not the default rather than myisam?
Or even why they bothered having myisam at all?
by lazy_yogi
Sat Aug 21, 2004 10:18 am
Forum: PHP - Theory and Design
Topic: OOP and database for business site
Replies: 23
Views: 11448

1) PHP.    It's got a much wider support base. If you have any problems, it's much easier to get help (just look at this forum).    It's open source - cheaper to run/upgrade    I'm not sure, but I think it's more power...
by lazy_yogi
Fri Aug 20, 2004 7:49 pm
Forum: Databases
Topic: Help with a query
Replies: 13
Views: 2472

It's not important to the current problem, but the "where '1'='1'" is so that i can re-use the query by passing in a where clase such as function select($where){ return "SELECT * FROM table WHERE '1'='1'".$where."ORDER BY table_id" } function get_by_customer_id($id){ $s...
by lazy_yogi
Fri Aug 20, 2004 10:19 am
Forum: Databases
Topic: Help with a query
Replies: 13
Views: 2472

There is an odd problem. I have 4 rows in my invoice table. With this query, I get 3 invoice rows only- one for each of the 3 customers that have invoice/s. SELECT *, invoice.* , IF(ISNULL(SUM(payment.cost)), 0.00, SUM(payment.cost)) as paid_off FROM invoice LEFT JOIN payment ON invoice.invoice_id =...
by lazy_yogi
Thu Aug 19, 2004 2:59 am
Forum: Databases
Topic: Help with a query
Replies: 13
Views: 2472

ah awesome .. thanks again
by lazy_yogi
Wed Aug 18, 2004 9:09 am
Forum: Databases
Topic: Help with a query
Replies: 13
Views: 2472

Just wondering if there is a way to do it in the db?
by lazy_yogi
Sun Aug 15, 2004 6:42 pm
Forum: Databases
Topic: Help with a query
Replies: 13
Views: 2472

There is no field 'paid_off'. That's a field that is calculated from another relating table.
by lazy_yogi
Sun Aug 15, 2004 7:15 am
Forum: Databases
Topic: Help with a query
Replies: 13
Views: 2472

Yep, that worked.
Thanks for the help.

Just one more thing. If there are no entries in the payment table for an entry, it shows as 'null' .
Is there a way to have this display as zero?
by lazy_yogi
Sun Aug 15, 2004 1:12 am
Forum: Databases
Topic: Help with a query
Replies: 13
Views: 2472

Help with a query

Hi, I've got a proabably fairly simple mysql query, but I'm ite sure how to do it. I have these 2 tables (these are the relavent fields): Invoice -------- id cost Payment ---------- invoice amount Each Invoice has a number of Payments (could be none). What I need is to be able to select all invoices...