Jump to content

Check out our Community Blogs


Member Since 30 Apr 2009
Offline Last Active Jul 23 2014 08:47 AM

Posts I've Made

In Topic: Order by different tables

27 February 2012 - 07:49 AM

The thing is that you can't name two values the same thing, that's the whole problem.

---------- Post added at 04:49 PM ---------- Previous post was at 02:55 PM ----------

I poked around with your solution and got it to work. It was almost as yours. Thanks :)

SELECT id, name, MAX( temp ) maxTime
SELECT u . * , v.time temp
FROM Users u
LEFT JOIN Votes v ON u.id = v.page
WHERE u.id <>28
SELECT u . * , m.time temp
FROM Users u
LEFT JOIN Messages m ON u.id = m.page
WHERE u.id <>28

) AS u

In Topic: PDO: Database connections and abstraction

01 February 2012 - 05:04 AM

The only solution I found was to use PARAM_INT and use the number the enum value represent(I have to go and check in the database all the time). Using PARAM_STR didn't work in any way I could think of and just using INTs seems too messy. Saving it as TEXT or VARCHAR in the database would work but is out of the question, wasting that much space is ridiculous but saving it as INTs is just difficult. I want to save a row's order's type and referring to indices is only to beg for problem.

In Topic: PDO: Database connections and abstraction

30 January 2012 - 11:24 AM

//PARAM_INT for int, PARAM_STR for string, PARAM_BOOL for bool

What would I use for enums? can't get it to work with either INT or STR.

In Topic: Helt with programming the tic tac toe game

01 December 2011 - 08:27 AM

Exactly, tell us what part you're having problems with. We won't make the code for you.

In Topic: returning multiple values

28 November 2011 - 11:42 AM

You can only return one value from a method. But what you could do is to return one value which includes more than one value, like an array or a vector or something similar.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download