Search found 766 matches

by Pyrite
Tue Aug 16, 2011 1:17 pm
Forum: Databases
Topic: Php mysql database question?
Replies: 2
Views: 1831

Re: Php mysql database question?

and then if you really want to get fancy ... :D

Code: Select all

SELECT @row := @row + 1 as counter, t.* FROM users t, (SELECT @row := 0) r
Then you can just do:

Code: Select all

while ($ma = mysql_fetch_array($result)) {
	echo $ma['counter'] . ':' . $ma['username'] . "\n";
}
:drunk:
by Pyrite
Thu Aug 11, 2011 8:26 am
Forum: Databases
Topic: Basic Query, GROUP BY not working - finds those I don't want
Replies: 8
Views: 2517

Re: Basic Query, where no row contains a certain word - how?

Just don't select *, and either use everything you select in the GROUP BY clause or use an aggregate function (like COUNT() perhaps).
by Pyrite
Wed Aug 10, 2011 10:09 pm
Forum: Databases
Topic: Linking sequences with tables
Replies: 1
Views: 1048

Re: Linking sequences with tables

What do you mean by dynamic sequences?

I use Postgres, and seqs are created/used automatically for serial types.

Not sure what you are asking.
by Pyrite
Wed Aug 10, 2011 9:38 pm
Forum: Databases
Topic: How do I get a prepared query as it will execute?
Replies: 4
Views: 1283

Re: How do I get a prepared query as it will execute?

Try using the General Query Log feature in MySQL.

http://dev.mysql.com/doc/refman/5.1/en/query-log.html

Also, many PHP frameworks log this as well, with certain debug levels turned on (e.g. CakePHP with Debug Level 2).
by Pyrite
Tue Nov 23, 2010 3:04 pm
Forum: PHP - Frameworks
Topic: [CakePHP] Introduce myself
Replies: 1
Views: 2850

[CakePHP] Introduce myself

Hello, I'm Pyrite, I've been using PHP since 1999, and been a member of devnet for several years. For the last 2+ years at work, I've been using CakePHP for rapid web development. I'm not a CakePHP expert, but I just wanted to introduce myself, and I'll try to help others using this framework. Cheer...
by Pyrite
Mon Nov 15, 2010 8:31 pm
Forum: PHPDN
Topic: CakePHP
Replies: 8
Views: 33146

Re: CakePHP

Jason, thank you for granting my wish for a home for CakePHP :) The frameworks forum you made is perfect. I do however disagree about your assessments of Cake, CakePHP code is really its own code, as compared to PHP code. Comparatively speaking, it would be like writing Java Desktop apps versus say ...
by Pyrite
Thu Jun 10, 2010 12:34 am
Forum: Databases
Topic: SQL Design Help (self join, sorta)
Replies: 1
Views: 581

SQL Design Help (self join, sorta)

I have a table that looks like this (people that play on my game servers): id|name|ip|guid And I have a search page, that basically does this: $sql = "SELECT id, name, INET_NTOA(ip) AS ip, guid FROM 1up_people WHERE (name LIKE \"%$query%\" OR INET_NTOA(ip) LIKE \"%$query%\" ...
by Pyrite
Wed May 19, 2010 12:45 pm
Forum: Coding Critique
Topic: Example code for new job
Replies: 6
Views: 5063

Re: Example code for new job

I have written phpDoc for several companies, that being said, I'll offer a few pieces of advice. Firstly, you seem to have most of your methods phpDoc'ed. Sorry, do you want me to say functions? Ha. But what about your constructor? It equally is important, Also what about your member variables? They...
by Pyrite
Mon Mar 29, 2010 7:33 pm
Forum: Regex
Topic: [FIXED] Need Help with Regex
Replies: 1
Views: 1606

Re: Need Help with Regex

Hmm, looks like I fixed it. I just added some \s* around the (.*?) and that seems to have fixed it.

Code: Select all

preg_match_all("/^\s*(\d+)\s*(-{0,1}\d+|CNCT|ZMBI)\s*(\d+)\s*(.*?)\s*(\d*)\s*(\S*)\s*(\d*)\s*(\d*)\s*$/", $line, $out);
by Pyrite
Mon Mar 29, 2010 6:17 pm
Forum: Regex
Topic: [FIXED] Need Help with Regex
Replies: 1
Views: 1606

[FIXED] Need Help with Regex

In the game Urban Terror, you can issue a rcon command called status which returns something like: [text] map: ut4_algiers num score ping name lastmsg address qport rate --- ----- ---- --------------- ------- --------------------- ----- ----- 4 1 45 {&}TheBrew 0 74.97.237.134:27960 13024 8000 5 ...
by Pyrite
Thu Oct 22, 2009 9:58 pm
Forum: PHPDN
Topic: CakePHP
Replies: 8
Views: 33146

Re: CakePHP

Anything ever become of this idea? I've been using CakePHP at work for over a year now, sure do wish there was more of a cake community here :idea:
by Pyrite
Thu Oct 22, 2009 9:49 pm
Forum: Graphics
Topic: photoshop
Replies: 14
Views: 82899

Re: photoshop

Why not try GimpShop ? :P
by Pyrite
Thu May 29, 2008 10:37 pm
Forum: PHPDN
Topic: CakePHP
Replies: 8
Views: 33146

CakePHP

It would be just lovely if there was a forum devoted to development with the MVC way of programming with PHP, if not specifically for the ruby on rails like framework known as CakePHP.

What do you think? :idea:
by Pyrite
Thu Mar 13, 2008 4:10 pm
Forum: Linux
Topic: Centralized Server
Replies: 0
Views: 1232

Centralized Server

Admining a Linux server starts to be a pain when all the accounts for all the types of services are in seperate places. I'd like to store all the accounts in one place on the server, and have all the services (including local accounts/ssh etc) authenticate against it. This would include Apache, Samb...
by Pyrite
Thu Feb 28, 2008 10:20 pm
Forum: General Discussion
Topic: Design Question
Replies: 11
Views: 620

Re: Design Question

Awesome!, so the real question is, can PHP parse the PDF?

I've seen many classes to create them, not many to read/parse them though?