RE: [PHP] Want to exclude first 10 records from table
select * from forum order by postdate desc LIMIT 10, -1 Assuming you are using MySQL of course. See the official documentation for further assistance: http://www.mysql.com/doc/en/SELECT.html -Original Message- From: Manisha [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 16 October 2002 4:44 PM To: [EMAIL PROTECTED] Subject: [PHP] Want to exclude first 10 records from table I am having forum table. First 10 records are treated as Current postings and rest are treated as Archive. I know how to take first 10 select * from forum order by postdate desc LIMIT 10 But I do not know how to take postings excluding above 10. I do not want to make use of loop rather I want to do this in one single query as I need to pass this to some further include files. Thanks in advance Manisha -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] why can't i do this?
Because the first example is not correct syntax? I wasn't aware that the first element in a comparison could ever be left out, is it that way in other languages? -Original Message- From: Peter Houchin [mailto:[EMAIL PROTECTED]] Sent: Thursday, 17 October 2002 2:15 PM To: php_gen Subject: [PHP] why can't i do this? howdy can some one please tell me why i can't do this elseif ($_POST['cost'] =4 =20001){...} but i can do this elseif ($_POST['cost'] =4 $_POST['cost'] =20001){...} Cheers Peter the only dumb question is the one that wasn't asked -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MySQL GMT -- Local time
Local to the client or local to the server? -Original Message- From: Jason [mailto:[EMAIL PROTECTED]] Sent: Thursday, 17 October 2002 3:26 PM To: php_gen Subject: [PHP] MySQL GMT -- Local time My logging application is feeding a MySQL database with data records that are time stamped with GMT time. I would like to query the database for records matching local time(eg. all records created on oct 17,2002 local time). I would prefer if the records could be formated in local time when returned from MySQL. What is the best way to do this. Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Odd request
No, there isn't, and no, there probably shouldn't be, since the height in pixels that the page will render in is dependent on client-side attributes like font size, resolution, browser type, etc. This might be an appropriate function in javascript, but not php. Any way in php to determine at what height html content will render??? If not, should there be? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Extract HTML tags
There are a couple of ways you could do it, the proper way with a regular expression, or you could just kludge it using explode() and chucking out the stuff you did not need. -Original Message- From: Shawn McKenzie [mailto:[EMAIL PROTECTED]] Sent: Thursday, 10 October 2002 7:43 AM To: [EMAIL PROTECTED] Subject: [PHP] Extract HTML tags I've loaded an html file into a string. What I'd like to do is create two new strings: first new string with the original string but remove all content from the beginning of the file up to and including body, and then remove from the end of file up to and including /body second new string only containing content after head up to and including body Any ideas on simple ways to do this? TIA -Shawn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Access denied to php files in Netscape 6
It's not impossible if the site is not opened up to full public access, and he is using different proxy settings on each browser. Check those. -Original Message- From: Chris Shiflett [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 2 October 2002 4:23 PM To: Chris Nielsen Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Access denied to php files in Netscape 6 This seems absolutely impossible. Can you verify that you are using the *exact* same URL with each browser? I would recommend copy/pasting the URL from each into a text document or something to be sure every slash, etc., is identical. This will also ensure that you are accessing these scripts via the http:// scheme rather than the file:// scheme. Chris Chris Nielsen wrote: I'm running PWS on WinXP Pro. I can't test my php stuffs in Netscape cause it says Access Denied when I try to access any php file. They work fine in IE6. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Cookie
The register globals function must be turned ON in your php.ini for the first method to work. -Original Message- From: Max Buvry [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 2 October 2002 2:38 AM To: [EMAIL PROTECTED] Subject: [PHP] Cookie Hi, I use : apache 1.3.26, php 4.2.3, postgresql 7.2 (under solaris 7). I attempt to modify my old sources which run with the previous versions and I meet a problem with the cookie. I read that we can see the contents of a cookie with 2 methods : echo $testcookie echo $_COOKIE[testcookie] For me, only the second method runs. An idea ? In advance, thanks mb -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] remote desktop control
Not really, no. It goes well beyond the capabilities of a server-side scripting language. There is a java implementation in VNC that allows this capability, though. -Original Message- From: Rahul [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 1 October 2002 4:53 PM To: [EMAIL PROTECTED] Subject: [PHP] remote desktop control Hello all, Is it possible to implement Web Based Remote Desktop Control using PHP or anyother webbased language? Aim is to share the remote(visitor's) system(desktop). If possible, plz let me know how to proceed. Advance thanks, -sadha -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Can I pass the ftp transfer mode in a string?
What if you enclose it in single quotes? -Original Message- From: John Kelly [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 1 October 2002 12:36 PM To: [EMAIL PROTECTED] Subject: [PHP] Can I pass the ftp transfer mode in a string? Can I pass the ftp transfer mode in a string like ... $filetype = FTP_ASCII; $upload = ftp_fput($conid, $dfile, $sfile, $filetype); I ask as when I do I get the following error message ... Warning: ftp_fput() expects parameter 4 to be long, string given If I replace $filetype with the text FTP_ASCII or FTP_BINARY it works fine. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] image wrapper - graphs
Try gnuplot: -Original Message- From: Mike Mannakee [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 1 October 2002 2:31 PM To: [EMAIL PROTECTED] Subject: [PHP] image wrapper - graphs Hi, Does anyone know of image creation libraries that will generate graphs? Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] syntax question
Check out this tutorial on the MySQL website: http://www.mysql.com/articles/mysql_intro.html It contains links to the basics of SQL and its syntax, as well as giving you a good grounding in MySQL specifically. As others have stated, most of the functionality you really need should be built into the SQL query. It's redundant to request excessive results from the database server, only to filter them out with custom php routines. -Original Message- From: Chris Shiflett [mailto:[EMAIL PROTECTED]] Sent: Monday, 30 September 2002 3:30 PM To: Justin French Cc: Jeff Bluemel; [EMAIL PROTECTED] Subject: Re: [PHP] syntax question Justin French wrote: on 30/09/02 2:44 PM, Jeff Bluemel ([EMAIL PROTECTED]) wrote: how to I test for a null value? empty()? isset()? if($var == )? if($var == NULL)?? have a look in the php manual for string functions, and comparison operators I think he maybe meant testing for null values in SQL. If this is true, there is the null keyword: is null and is not null. select * from table_name where column_name is not null This selects all rows from a table where the data in column column_name is not null. Be careful with this, as it actually tests for null and not an empty string, for example. If you want to test whether a value is null once you have assigned it to a PHP variable, you can use one of Justin's suggestions. In addition, PHP has null as well. Happy hacking. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Keeping your published script safe?
There's no real foolproof free way of doing this, it's a fact of life that there will always be people who do this. I wouldn't lose sleep over it. Console yourself with the fact that for every person who does not acknowledge your effort, there are probably 10 people who do. -Original Message- From: Stephen Craton [mailto:[EMAIL PROTECTED]] Sent: Friday, 27 September 2002 7:09 AM To: [EMAIL PROTECTED] Subject: [PHP] Keeping your published script safe? Hello, I have many scripts published at various script sites and I just got a report of an incident where the user has removed my copyright at the bottom of the script. We have reached an agreement thank heavens, they're going to go search for a script that doesn't require the copyright. Anyway, I was just wondering if there was any program or script that can keep your script safe from people removing the copyright. Please help! I'd really like to keep my scripts safe from those hacker people. Thanks, Stephen http://www.melchior.us http://php.melchior.us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] length function
http://www.php.net/manual/en/function.strlen.php -Original Message- From: Jeff Bluemel [mailto:[EMAIL PROTECTED]] Sent: Friday, 27 September 2002 1:35 PM To: [EMAIL PROTECTED] Subject: [PHP] length function I am looking for a function that will give me the number of characters of a string, or number. I tried using the function length, but that function seems to deal with arrays, and doesn't seem to function like I am intending it to. -- Thanks, Jeff Bluemel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Store locator / postcode proximity
I wouldn't trust a 10-above or 10-below rule, personally, unless you weren't too concerned about the accuracy of your information. Why don't you give Australia Post a call? -Original Message- From: Jason Murray [mailto:[EMAIL PROTECTED]] Sent: Monday, 10 December 2001 10:22 AM To: '[EMAIL PROTECTED]' Subject: [PHP] Store locator / postcode proximity Hi folks, I've seen messages on here in the past about Store Locator tools, where someone enters a postcode and the nearest store to that postcode is found. I'm wondering if anyone has any information about how to get the proximity data for postcodes in Australia? Or is it safe to assume that if a postcode is, say, 3107, that 3120 or 3110 (for example) are nearby as well as 3108 (so, perhaps, 10 above and 10 below could be safely assumed to be nearby?) I saw some mention of this a few months ago here from some of the other Aussies on the list, but I've long since lost the archived messages. Could someone please help me a little with this? :) Thanks Jason -- Jason Murray [EMAIL PROTECTED] Web Developer, Melbourne IT Work now, freak later! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] very urgent assistance
This would have to be the most bizarre spam I have ever read. -Original Message- From: Adewale.Johnson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 6 March 2001 6:18 PM To: [EMAIL PROTECTED] Subject: [PHP] very urgent assistance Dr.Adewale.Johnson. 16 Kingsway Road Ikoyi, Lagos Nigeria.. [EMAIL PROTECTED] 6th, December , 2001. Sir, Request for Urgent Business Relationship. First I must solicit your confidence in this transaction. This is by virtue of its nature as being utterly confidential and top secret. We shall be counting on your ability and reliability to prosecute a transaction of great magnitude involving a pending business transaction requiring maximum confidence. We are top officials of the Federal Government Contract Review Panel who are interested in importation of goods into our country with funds which are presently trapped in Nigeria. In order to commence this business we solicit your assistance to enable us RECIEVE the said trapped funds ABROAD. The source of this fund is as follows : During the regime of our late head of state, Gen. Sani Abacha, the government officials set up companies and awarded themselves contracts which were grossly over-invoiced in various Ministries. The NEW CIVILIAN Government set up a Contract Review Panel (C.R.P) and we have identified a lot of inflated contract funds which are presently floating in the Central Bank of Nigeria (C.B.N). However, due to our position as civil servants and members of this panel, we cannot acquire this money in our names. I have therefore, been delegated as a matter of trust by my colleagues of the panel to look for an Overseas partner INTO whose ACCOUNT the sum of US$31,000,000.00 (Thirty one Million United States Dollars) WILL BE PAID BY TELEGRAPHIC TRANSFER. Hence we are writing you this letter. We have agreed to share the money thus: 70% for us (the officials) 20% for the FOREIGN PARTNER (you) 10% to be used in settling taxation and all local and foreign expenses. It is from this 70% that we wish to commence the importation business. Please note that this transaction is 100% safe and we hope that the funds arrive your account in latest ten (10) banking days from the date of reciept of the following information by email: A suitable name and bank account into which the funds can be paid. The above information will enable us write letters of claim and job description respectively. This way we will use your company's name to apply for payments and re-award the contract in your company name. We are looking forward to doing business with you and solicit your confidentiality in this transaction. For security reasons, please respond only to the above email address or fax number 234 1 7747907. I will bring you into the complete picture of this pending project when I have heard from you. Yours Faithfully, Dr.Adewale.Johnson. Tel/fax: 234 1 7747907 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] odrer by alphabet
You can simply order by that field in your SQL string...ie: SELECT * FROM TABLENAME ORDER BY FIELDNAME; And to switch the order: SELECT * FROM TABLENAME ORDER BY FIELDNAME DESC; -Original Message- From: Rambo Amadeus [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 4 December 2001 1:15 PM To: [EMAIL PROTECTED] Subject: [PHP] odrer by alphabet hi, i have about 100 names in my database. How should i list them by alphabet. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]