To create a DB and user, just do:
Code:CREATE DATABASE printers;
GRANT ALL PRIVILEGES ON printers to 'printers'@'localhost' IDENTIFIED BY 'password';
Printable View
To create a DB and user, just do:
Code:CREATE DATABASE printers;
GRANT ALL PRIVILEGES ON printers to 'printers'@'localhost' IDENTIFIED BY 'password';
does that look right?Code:mysql> SHOW GRANTS FOR 'printers'@'localhost';
+-----------------------------------------------------------------------------------------------------------------+
| Grants for printers@localhost |
+-----------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'printers'@'localhost' IDENTIFIED BY PASSWORD '*D8DECEC305209EEFEC43008E1D420E1AA06B19E0' |
| GRANT ALL PRIVILEGES ON `mysql`.`printers` TO 'printers'@'localhost' |
+-----------------------------------------------------------------------------------------------------------------+
edit: I found my mistake.. I had to change it toThanks for the quick way of adding too :)Code:GRANT ALL PRIVILEGES ON `printers`.* TO 'printers'@'localhost'
And also, im not sure what to change on this line in the init.php file
sorry for all the dumb questionsCode:$db = new fDatabase('mysql', 'printmaster', 'root', '', 'localhost');
edit: figured it out...
Its database type, database name, username, password, host...
Sorted now cheers!
Depending on what you pay on delivery of toner cartridges (none for us since our printers are all on a contract), our printers (HP) are set to email helpdesk when toner is low and then we order a new one straight away. we have some stock in case they doesn't come in time. We don't need to track what we have as the system is self-replenishing.
RabbieBurns has created some nice instructions for installing on Linux - now available on the project wiki: Installation on Linux.
Also set up a demo site if anyone wants to have a look at a live install:
Home - PrintMaster
Using apache with virtual hosts.. Basically you have a main generic apache config, and then you have a seperate config for each domain/subdomain.
Its a way of running multiple websites on 1 static IP.
Configuring and Using Virtual Hosts in Apache
Hello Everyone;
Please find attached my 'patched' printer master whith a facility to monitor costs.
Known Bug: When quiering the costs table if the same row is returned multipule times the cost will only to be summed once.
Here is the offeding code
Any Ideas?Code:"SELECT SUM(`cost`)
FROM `costs`
WHERE `id` in (
SELECT `cost_id`
FROM `events`
WHERE `printer_id` = $printer_id AND DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= `date`
)"
Attachment 8932
Your have to create your database using the printmastertest.sql in the zip file.
Could an export data option be added to this project?
this project is ideal for use in our school one thing missing for us is the ability to export data to CSV or some form to edit in Excel
would this be hard to impliment
big thank you goes out to the creator and all the people who have added little extras.
round2it: That sounds relatively simple. Which data were you thinking about - just toners & stock?
How come this hasn't been promoted to a "Edugeek Project" status yet?! It's great..
I'm trying to get a test db up on a virtual LAMP linux box.
I keep getting this kind of error ^ on pages such as Add Consumble and "The table manufacturers is not in a *-to-many relationship with the table models" when viewing manufacturers.phpCode:Uncaught fProgrammerException
-----------------------------
{doc_root}/printers/consumables.php(120): include('{doc_root}/printe...')
{doc_root}/printers/views/consumables/addedit.php(35): Consumable->getModels()
{doc_root}/printers/inc/classes/Consumable.php(167): Consumable->buildModels()
[internal function]: fActiveRecord->__call('buildModels', Array)
{doc_root}/printers/inc/flourish/fActiveRecord.php(914): fORMRelated::buildRecords('Consumable', Array, Array, 'Model')
{doc_root}/printers/inc/flourish/fORMRelated.php(209): fORMSchema::getRouteName(Object(fSchema), 'consumables', 'models', NULL, '*-to-many')
{doc_root}/printers/inc/flourish/fORMSchema.php(179)
The table consumables is not in a *-to-many relationship with the table models
Pretty sure I've got the "session" folder set up okay, but I think something is wrong with the relational links between the tables in my db - I tried making a completely fresh db by importing to .sql file but still getting the same issue. Any clues??
im sure they guys can sort this out for you
ive just installed on my machine at work added all my printers and stock
i used the xampp route works perfectly for me at work and at home. but it was on windows
and i agree this should be an edugeek project now it has so much potential
clean tidy does eactly what it says on the tin.
I think this is an excellent project. It would be good to have export to excel button on the reports section, I think the only thing that is missing is the ability to charge the departments for the toner, another idea wold be good to have something like this for projector lamps.
Thanks