[PHP] syntax error on mysql select statement

2002-10-13 Thread Pablo Oliva
Can anyone see any problems with the following: SELECT * FROM ad AS t1, ad_location AS t2 ORDER BY t1.ad_ts_update LIMIT 0,40 WHERE t1.ad_location = t2.ad_loc_id AND ( (t1.ad_cdl_a = on OR t1.ad_cdl_b = on) AND t1.ad_longhaul = on AND t1.ad_fulltime = on ) AND ( t2.ca_losangeles = 1 OR t2.ca_santa

[PHP] trying to get a certain num of rows in mysql

2002-10-13 Thread Pablo Oliva
When doing a select query, is there any way to specify which rows you want "selected", as in rows 1 through 40, and then 40 - 80 on the next query. I've been searching through the manual but can't find anything. Should this be done through a php script instead, or is there a native (mysql) comman

RE: [PHP] help with mysql query / logic

2002-10-10 Thread Pablo Oliva
Please disregard, I think that I figured it out. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] help with mysql query / logic

2002-10-10 Thread Pablo Oliva
I have 2 tables, one with job ad information, and a second one with the locations that this ad applies to. When a person queries the job ad table with their criteria, I would also have to query the location table to see if the location that they chose applies to this ad. I am not sure how to co

[PHP] how to get id from table I just inserted into

2002-10-10 Thread Pablo Oliva
I have a mysql db with a particular table that I am inserting into. This table has an id column that auto-increments. Is it possible to get the id of the row that I just inserted into, without re-querying??? The problem that I have is that the data being inserted will be identical for several ro

[PHP] post(ing) data without a form

2002-10-05 Thread Pablo Oliva
OK, I'm attempting this again: header ( 'Location: ../test/test.php' ); sendByPost(); function sendByPost() { $host = "localhost"; $port = 80; $postdata = "field1=value1&field2=value2&field3=value3"; if ($sp = fsockopen($host, $port)) { fputs($sp,"POST /jotr/test/test.php HTTP/1.0\

[PHP] sending post without a form

2002-10-04 Thread Pablo Oliva
Did the individual trying to send post(ed) data without the use of a form succeed? I tried doing this before and didn't have any luck with it... And I eventually gave up. Has anybody had any luck in doing it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.

[PHP] session lifetime

2002-10-01 Thread Pablo Oliva
session.gc_maxlifetime specifies the number of seconds after which data will be seen as 'garbage' and cleaned up Let's say it's set to 900. How is this counted, from the time of the session is initialized, or is this counter reset every time you go to a new page. Does this makes sense?

[PHP] conditional statement problems

2002-09-30 Thread Pablo Oliva
$title_err = ($adTitle == "") ? 1 : strlen($adTitle) > 50 ? 2 : 0; Can anyone tell me why this is not evaluating correctly (returning a value of 1) when $adTitle is an empty string? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] error notice - valid code

2002-09-30 Thread Pablo Oliva
Notice: Use of undefined constant year - assumed 'year' in c:\apache\htdocs\jotr\includes\globalFooter.php on line 3 Is this not valid code? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] algorithm design

2002-09-29 Thread Pablo Oliva
I have a new project that I might be working on and need some guidance from the more experienced software designers on this list. The project is taking input from users and sorting the users, based on the input, into 4 or 5 separate "types" of users, categorizing them into these categories. I have

[PHP] hash function secret

2002-09-29 Thread Pablo Oliva
I was reading the sept. issue of linux magazine and they discussed security issues with web apps. They mentioned that to generate signatures, you should include a secret with your hash function: s = S(m) = H(secret, H(m, secret)) What is the secret, just a sort of secret code that you include,

[PHP] field size for common data

2002-09-27 Thread Pablo Oliva
What amount of chars is reasonable and should I allow for each of the following fields in a database: company name: 30 chars address/street: 30 chars city: 30 chars Thanks.

RE: [PHP] Re: Specify authentication for SMTP mailserver?

2002-09-22 Thread Pablo Oliva
You can run your own SMTP server, if it helps... http://www.postcastserver.com/ Extremely easy to set up. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] sessions

2002-09-21 Thread Pablo Oliva
I have read that in order to account for browsers/users who do not have cookies enabled, that you should append the session id to the url (query string). Now, if I do do that, www.site.com?phpsessid=gafklgjr952344afgfa, do I have to do anything so that I force php to recognize the session id in t