?

Log in

About this Journal
Current Month
 12345
6789101112
13141516171819
20212223242526
2728
Feb. 25th, 2011 @ 09:13 am MySql noobs
Current Mood: confusedconfused
Hi Guys!

I've got a question for you that's probably pretty easy, but I'm not that familiar with MySQL beyond how to make simple queries.

I'm hoping you can help me out.

I've got two tables: 1 that has when a certain process starts and stops for each company in our database, and one that has all the items that process has to take care of for each company (each item is it's own row).

Right now the query tells me how many companies have been processing their queue since midnight, but I'd like it also to tell me how many items it has left to process for those company.

I tried just adding a count() to the query, but that's not exactly returning the results I want, since I'm not sure how to specify that I want it to pull the count for each individual company.

Can someone point me in the right direction for how to do this all in one nice neat query?

Thanks!
About this Entry
Spaced
julisana:
Dec. 28th, 2010 @ 12:21 pm Tags
I want to create a database of information, and I want to be able to support multiple tags to improve search capabilities.
I'm not sure what is the best way to implement such a (tag) system.

I would like to use a combination of PHP and MySQL for this task.

Wondering if anyone can point me in the right direction?
About this Entry
246_slc:
Jan. 6th, 2010 @ 02:37 am free site creation
reasonable price, high quality, short terms. Working for portfolio.
free site creation - dockazak2
About this Entry
docka3ak:
Feb. 8th, 2009 @ 04:27 pm Tracking User Downloads
I’m using PHP and MySQL to create a dynamic page that delivers files to users based on group settings.

The user is given a variety of files to download, based on their unique settings.
I want to track what files the user selects to download.

For the life of me…I can’t figure out how to do that without creating a button for each file.
(The button triggers an entry into the appropriate table and starts the download.)

Is there a more elegant solution? 
(I’d rather do it within a hyperlink)

Appreciate any help!

About this Entry
246_slc:
Feb. 1st, 2009 @ 03:58 pm Coppermine Help
Current Mood: crushedcrushed
I haven't touched coppermine or anything like that in over two years and I've never played with php much before.

I have a coppermine gallery and I changed my URL for my domain and last night I went to change the header URL to match with the new one and it didn't show up. So I adjusted it again to read just the image name and now I am getting a parse error that won't go away. I can't seem to figure out how to get it into debug mode and someone's help would be greatly appreciated.

This is the URL: http://www.christiankaneonline.com/gallery/
I was in the admin settings to ajust the header when this happened and I can't even go back into there and fix it again. I even tried deleting the files in the directory and reuping them but that didn't work either.

Help. Someone. Anyone please. I put so much work into this gallery and I am spazing out.
About this Entry
Misc - Intarwebs?
remember_nomore:
Jan. 26th, 2009 @ 11:42 am RSS feeds.
Anyone have a good suggestion for open source/free code that will let me pull RSS feeds into a web page (in this case it is a cheap quick option to pull in news items the client posts to a Wordpress blog). Preferably code that will cache the feed locally in some manner and update it using cron, so as to minimize the response-time impact of a live feed.

Suggestions?
About this Entry
Silly - Dirty Face
thirdworld:
Oct. 16th, 2008 @ 03:33 pm date/time parameters wtf
I'm really new to PHP and I'm having alot of trouble remembering these date parameters because they seem to make no sense whatsoever.

l: Day of the week. Values Sunday through Saturday ???
F: Normal month representation. Values January through December. ???

Is there something I'm missing or do I simply need to bite the bullet and just memorize what means what?
About this Entry
tori
mattrd:
Sep. 25th, 2008 @ 12:50 am CRM?
Current Music: Downoad (the band) - The Eyes of Sanley Pain
ok... so I have a possible gig writing a CRM (Custome Relationship Management) application for a company.

However I've never even heard of a CRM until I was talking to this company. The basic requirements (access/permission levels and maintenance, content management, and such) wouldn't be a problem.

So my question is : Has anyone ever dealt with a CRM before?
Are there any CRMs with online demos so I can see one in action?
I've been hitting google for the past 30 minutes but wanted to ask here also.

So any experience in this realm? This is going to be custom for this company (yes, reinventing the wheel to make it custom more or less but ohwell) but want to see some working examples and hear more from others

And this may be off topic, but since I'm going to be developing it (php 5/mysql/apache) I'm hoping this is ok for here and everywhere it's x-posted.
About this Entry
mouse
exeyel:
Sep. 22nd, 2008 @ 01:17 pm problem with arrays
Hello,

I wonder if someone here could help:

I'm working on a calendar that reads information from a database, the code I've borrowed uses an array to populate the calendar:

$days = array(

2=>array('link','linked-day'),

3=>array('link','linked-day'),

8=>array('link','linked-day'),

22=>array('link','linked-day'),

);

So logically I tried:

$select="SELECT * FROM calendar WHERE smonth='$month' ORDER BY sday";
$rows = mysql_query($select,$calendar);
while ($row = mysql_fetch_row($rows)) {
$day=$row[1];
$daysx.="$day=>array('link','linked-day'),";
}
$days=array($daysx);

Which should give a similar result, however something doesn't work. Does anyone have any idea what is going on.
About this Entry
astro 10th aug 2007
fyremoon:
May. 14th, 2008 @ 11:49 am Alternative to die/exit
EDIT: SOLVED.  Using PHP5 exceptions, as follows:

echo "Before function call\n";

try {
    first();
} catch (Exception $fatalErrorInCoreConversion) {
    echo 'Caught exception: ',  $fatalErrorInCoreConversion->getMessage(), "\n";
}

echo "After function call\n";

function first() {
    echo "-In first, before second\n";
    second();
    echo "-In first, after second\n";
}

function second() {
    echo "--In second before the end\n";
    throw new Exception('Aaaaargh.');
    echo "--In second after the end\n";
}


Renders:
Before function call
-In first, before second
--In second before the end
Caught exception: Aaaaargh.
After function call
ORIGINAL QUESTION:
Hi all,

I was wondering what methods you folks use to avoid using die/exit. They keep code simple, but also are clunky on the UI side. OTOH, in a function library, anything other than die could get quite clunky in the code. Consider this code (Example 1):
About this Entry
Silly - Dirty Face
thirdworld: