Jump to content

mattclements

Members
  • Posts

    84
  • Joined

  • Last visited

    Never

Everything posted by mattclements

  1. Could you provide the SQL Statement to Create the DB & Tables and provide some sample data which produces the 3.5 second times and I can analyse and improve for you. Regards, Matt
  2. Hello all, I am completing my final year project for BSc Computer Science working on a Business Application for a Catering Business to help them steamline their workflow. If you have a few minutes I would be greatful! http://www.mattclements.co.uk/survey/index.php?sid=66577&lang=en
  3. Hello All, I have used some SOAP bits with PHP before but not sure on this one: <User> <APIKey>string</APIKey> <Details> <Title>string</Title> <FirstName>string</FirstName> <LastName>string</LastName> </Details> </User> Now I think... I should be passing 2 variables, One as the API Key, another as the array of details: require_once 'SOAP/Client.php'; $api_key="ABC"; $details={"Title","First Name","Last Name"}; $wsdl_url = 'http://testapi.org/api.asmx?wsdl'; $WSDL = new SOAP_WSDL($wsdl_url); $client = $WSDL->getProxy(); $response = $client->User($lp_api_key, $details); Is this correct?
  4. Hello all, Our dedicated server was suspended for a short time today with the following security log (switch traffic) issues. I added a firewall rule to get this sorted for now however does anybody have any idea what this could be? 06:11:04.017603 IP x.x.x.x.52218 > y.y.y.y.110: UDP, length 15 ? Regards, Matt
  5. Hello all, For a new project I am working on I will need to use GD Library to generate images on the fly. As you can see from the included image I will define a glow colour and a main colour (Gold = Glow, Black = Main) and the background will always be transparent. Any ideas how I could do this in GD Library? Regards, Matt
  6. Please see the attachment - I have seen this done in HTML before but cant find it now im looking - any ideas? Matt [attachment deleted by admin]
  7. Just have - it wont let me change the auto increment values - so I have had to move the 2000 batch into a seperate table. Thanks for your advise. Regards, Matt
  8. Really - I thought a primary key is a constraint and therefore would skip the values.
  9. Hello all, I have built a script that generates automated PDF invoices. The first batch's ID's were: 2044-2106 as I forgot to reset the auto increment value after testing - I then reset this and new invoices are now 1-80. When the invoices reach 2044 will they just miss 2044-2106 as I want, or will they overwrite/throw an error? Regards, Matt
  10. Hello all, I have some private details that need to be outputted replacing some characters with Stars. I would like to do this on the SELECT statement, rather than in PHP as this would be more secure. IE: Oracle: 102030 SQL Select: XXXX30 or 30 PHP: XXXX30 or XXXX30 I don't mind formatting the output in PHP - just want the SELECT Command to SELECT the last 2 characters of a column. Regards, Matt
  11. select p.prod_id, p.prod_name, p.prod_cat, c.cat_name, m.man_name, p.prod_price, p.prod_date, p.prod_seq, p.prod_default, t.type_name from (prods AS p, cats AS c, mans AS m) left join types AS t on p.prod_type=t.type_id where prod_cat=cat_id and prod_man=man_id order by cat_seq, cat_name, prod_seq, prod_name Fixed! Cheers, Matt
  12. So - My updated query is: select p.prod_id, p.prod_name, p.prod_cat, c.cat_name, m.man_name, p.prod_price, p.prod_date, p.prod_seq, p.prod_default, t.type_name from prods AS p, cats AS c, mans AS m left join types AS t on p.prod_type=t.type_id where prod_cat=cat_id and prod_man=man_id order by cat_seq, cat_name, prod_seq, prod_name Still causing: Unknown column 'p.prod_type' in 'on clause' (Error 1054) How can I avoid using commas? Regards, Matt
  13. prod_type exists in the prods table. Hint: use aliases for greater readability of your queries - Please explain Hint2: avoid joins through comma. Better use INNER JOIN - as far as im aware I am not joining through comma
  14. Hey all, This used to work, and with a change from MySQL 4 to MySQL 5 it broke - I belive it is a bug currently being fixed: select prod_id, prod_name, prod_cat, cat_name, man_name, prod_price, prod_date, prod_seq, prod_default, type_name from prods, cats, mans left join types on prod_type=type_id where prod_cat=cat_id and prod_man=man_id order by cat_seq, cat_name, prod_seq, prod_name causes: Unknown column 'prod_type' in 'on clause' Any idea how to rewrite the code to fix this? Regards, Matt
  15. Hello all, I have been looking at Git & SVN for a project - but wondering on views. Basically I want all the developers to continue accessing & directly editing the source code on our server. However I would like a mechinism of finding the changes made on a certain day - should anything go wrong! At the moment I have tar.gz files downloading at midnight every night - and should I need them - I unzip them and WinMerge them to check the differences. Regards, Matt
  16. Ok My current code is: elseif ($sqlsort=="c.club_ref") $stmt="select * from (select c.contract_id,c.name,wc.EMAIL,wc.TELEPHONE,wc.MOBILE,c.our_ref,c.club_ref,to_char(c.sign_date,'DD-Mon-YYYY') sign_date,to_char(c.lastpay_date,'DD-Mon-YYYY') lastpay_date,c.lastpay_amt,c.stat_flag,row_number() over (ORDER BY c.club_ref desc) r from web_members c, web_contracts wc where c.login_id=:sucid and c.club_id=:club_id and c.status = 'L' and c.contract_id = wc.contract_id) where r between :min_row and :max_row";
  17. Hey all, Just a quick one (should be simple) - at the moment my database has a sorting function when using the screens. However the Client Ref Number is a "String" fieldtype as the client can enter both numbers & letters. However when sorting it shows the following: Test Testing 8044 8045 8046 22454 (Obviously sorting as a String rather than by numbers) The to_number() in a sort throws an error as there are letters & symbols in the data. Any ideas? Regards, Matt
  18. I won't keep these files - generate them on the fly & email - i can get it to attach a tempory file no problem - but how do i get it to save it automatically?
  19. Hey all! I am using PDF Libs to auto generate PDF Invoices - at the moment I can download these manually as the code has: //Close Page PDF_end_page($mypdf); PDF_close($mypdf); //Buffer & Display Page $mybuf = PDF_get_buffer($mypdf); $mylen = strlen($mybuf); header("Content-type: application/pdf"); header("Content-Length: $mylen"); header("Content-Disposition: inline; filename=gen01.pdf"); print $mybuf; PDF_delete($mypdf); This asks the user to download the file. However I am now trying to get the script to add this file to an email as an attachment serverside (using PHP) and email clients their invoices. Any ideas? PDFLibs, PHP 5, MySQL 5, FC4 Regards, Matt
  20. Fixed! I had a folder called php.d with lots of .ini files in it linking to modules. Cheers, Matt
  21. Hello all, On running any command line PHP (such as even php -v) I get: [root@server /]# php -v Failed loading /usr/lib/php/modules/php_ioncube_loader_lin_5.0.so: /usr/lib/php/modules/php_ioncube_loader_lin_5.0.so: cannot open shared object file: No such file or directory PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/odbc.so' - libodbc.so.1: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/sitebuilder.so' - /usr/lib64/php/modules/sitebuilder.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/snmp.so' - libnetsnmp.so.5: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/zip.so' - /usr/lib64/php/modules/zip.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP 5.0.4 (cli) (built: Nov 8 2005 08:27:11) Copyright (c) 1997-2004 The PHP Group Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend Technologies When I look at the extentions folder I have: [root@server modules]# ls bcmath.so gd.so mbstring.so ncurses.so snmp.so xsl.so dba.so imap.so mysqli.so odbc.so soap.so dom.so ldap.so mysql.so pgsql.so xmlrpc.so Any clues? Regards, Matt
  22. Sorted it - Should be >= rather than => => is to do with setting arrays. Matt
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.