Re: [PHP-DB] Need help in solving issues with configuration of php-5.2.8 with mysql-5.3.1

2009-03-05 Thread niranjan k
Hi Chris, Thanks for your response. Is there any way to find out which files are in 32 bit or 64 bit? Regards, Niranjan --- On Thu, 3/5/09, chris smith wrote: From: chris smith Subject: Re: [PHP-DB] Need help in solving issues with configuration of php-5.2.8 with mysql-5.3.1 To: niranjan_..

Re: [PHP-DB] Need help in solving issues with configuration of php-5.2.8 with mysql-5.3.1

2009-03-04 Thread niranjan k
Need help in solving issues with configuration of php-5.2.8 with mysql-5.3.1 To: niranjan_...@yahoo.com Cc: php-db@lists.php.net Date: Thursday, March 5, 2009, 3:01 AM niranjan k wrote: > Hi Chris, > > Thanks for the response. > >> 1. I ran php configuration as below. >>

Re: [PHP-DB] Need help in solving issues with configuration of php-5.2.8 with mysql-5.3.1

2009-03-03 Thread niranjan k
Hi Chris, Thanks for the response. > 1. I ran php configuration as below. > > $./configure --with-apxs2=/usr/local/apache2/bin/apxs > --with-mysql=/apps/mysql/mysql > > It went fine. Chris > Are you sure? Yes it went fine. > 2. While running make, i got following relink error. > > ld: fatal:

[PHP-DB] Need help in solving issues with configuration of php-5.2.8 with mysql-5.3.1

2009-03-03 Thread niranjan k
Hi, I installed 64 bit MySQL-5.3.1 and i am in the process of installing php-5.2.8. While configuring php with mysql, getting following issues. Issue: 1. I ran php configuration as below. $./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/apps/mysql/mysql It went fine.

Re: [PHP-DB] basic form entry

2007-10-07 Thread T K
> mysql_query ("INSERT INTO users (First,Last,Phone,Mobile,Email,Web) VALUES > ('$first_name','$last','$phone,'$mobile','$email','$web') "); > > echo('$username','$last') This doesn't work. You need to make a variable for the executed query, like, $query = mysql_query(.); After that, you get

[PHP-DB] Preparing SQL insert statements from CSV files

2007-10-04 Thread T K
Hi, I have to parse csv files and put them into database. I was able to parse the files by fgetcsv() and made an HTML table. But, when it comes to parse more closely and make "INSERT INTO" statement, then I'm having problems with, probably "for-loop". For example, how do you do this task with the

Re: [PHP-DB] Prevention for multiple submissions from the same form

2007-10-04 Thread T K
Thank you for answering my question. Can anybody explain a simple JavaScript only solution? I haven't used JavaScript except for some copy-and-paste jobs. Tek -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Prevention for multiple submissions from the same form

2007-10-04 Thread T K
Hi, I have a form with a button, which adds user inputted data into database. I've been looking for a way to prevent users from pressing the same button twice mistakingly. I've learned that this is possible to make and send a unique id in hidden input, and check if the id is used before database

Re: [PHP-DB] PHP4 and Constructor

2007-10-03 Thread T K
Thanks guys! I got the same name trick for PHP 4 class constructor. All the best, T -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] PHP4 and Constructor

2007-10-03 Thread T K
Hi, I would like to use constructor in PHP4, but how do you make a constructor? In PHP5, I do like class ClassName { function __construct() { } } But PHP4 doesn't have such a thing as __construct()... Reading the official manual didn't make me understood. Does this mean the very firs

[PHP-DB] Re: Looking for a small open-source PHP-DB app that utilize OOP.

2007-09-29 Thread T K
Thanks all. Looks like some tutorials and the survey system look a very good start to me. Especially the code of UCCASS looks very readable. Thanks a bunch. >

[PHP-DB] Looking for a small open-source PHP-DB app that utilize OOP.

2007-09-27 Thread T K
Hi, For a study purpose, I'm looking for a small open source program that works in PHP-MySQL. In particular, I would like to see some examples with PHP 5 and Object-Oriented Programming (such as class, objects, and so on). I'm looking for a small program, possibly like blog, wiki, forum and so on.

[PHP-DB] strange mysqli error

2006-08-22 Thread Richard K Miller
ost (PHP 5.0.4 + MySQL 5.0.22) I NEVER get any errors. There's nothing else in my error logs, $db-errno is 0, and $db->error is empty. Interestingly, I never get any errors from the constructor. Any ideas? Richard --- Richard K. Miller www.richardkmiller.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: Double Inserts

2005-02-02 Thread Peter K. Lee
Hi Shri, [EMAIL PROTECTED] (PHPDiscuss - PHP Newsgroups and mailing lists) writes: > Hi, I am new to the mailing list and to PHP / MySQL. I am facing an > unususal problem. I am trying to insert some data into MySQL DB through > via Web. The code is executed OK - no errors but the same record get

RE: [PHP-DB] database connectivity problem

2005-02-02 Thread Adams, Jonathan K. [C]
b@lists.php.net' Subject: Re: [PHP-DB] database connectivity problem Adams, Jonathan K. [C] wrote: > Here is the error: "Warning: sybase_connect() [function.sybase-connect]: > Sybase: Unable to allocate connection record > > My configuration - The database is Sybase ASE 12.0

[PHP-DB] database connectivity problem

2005-02-01 Thread Adams, Jonathan K. [C]
Here is the error: "Warning: sybase_connect() [function.sybase-connect]: Sybase: Unable to allocate connection record My configuration - The database is Sybase ASE 12.0 running on Solaris 8 The webserver is Apache 1.3.33 with PHP 5 running Solaris 9 The sybase libraries are shared via NFS, which

[PHP-DB] php database connectivity issues

2005-02-01 Thread Adams, Jonathan K. [C]
Here is the error: "Warning: sybase_connect() [function.sybase-connect]: Sybase: Unable to allocate connection record My configuration - The database is Sybase ASE 12.0 running on Solaris 8 The webserver is Apache 1.3.33 with PHP 5 running Solaris 9 The sybase libraries are shared via NFS, which

RE: [PHP-DB] PHP + SSL + LDAP + IPLANET

2004-09-19 Thread Karamchedu, Rajeev K.
Server ?! rajeev -Original Message- From: Karamchedu, Rajeev K. [mailto:[EMAIL PROTECTED] Sent: Sun 9/19/2004 6:26 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] PHP + SSL + LDAP + IPLANET Greetings, (That Iplanet word must have peaked your interest...riight...) OS: Solaris 9 CC: GCC 3.2.2

[PHP-DB] PHP + SSL + LDAP + IPLANET

2004-09-19 Thread Karamchedu, Rajeev K.
Greetings, (That Iplanet word must have peaked your interest...riight...) OS: Solaris 9 CC: GCC 3.2.2 APP: Sun ONE Web Server 6.2SP2 LDAP: Sun ONE Directory Server 5.2 (configured for SSL and confirmed with non-php apps) Configured PHP 4.3.8/or 5.1 with openssl, openldap, libxml, zlib using GCC

[PHP-DB] Accessing MS SQL from Linux

2004-03-12 Thread S K Rana
My domain is hosting through a hosting company on Linux with PHP 4.3.4. Hosting company is not open to re-compile PHP for using FreeTDS or any other application. If I can not use FreeTDS, what other options do I have? a) Can Pear be used? It is 4.3.4. I tried but got error. b) Can ADO

RE: [PHP-DB] transaction locking

2003-12-05 Thread Aleks K
Thanks Miles and John for you answers... Yes I am using MySQL. I think I can work it to use the dB to generate these. I ran into The problem originally because this dB was taking up where a different Tool was ending and I needed to start with a specific number scheme. Here Is a though... If I ha

Re: [PHP-DB] in-line function?

2003-07-21 Thread Leif K-Brooks
Donny Lee wrote: > Ohhh.. sorry for that. it's quite simple, i'm wondering if > we can have something like those in-line functions in C++: > > class someCLASS { > var $varLength; > // other stuff > > inline function length() { > return $this->varLength; > }

Re: [PHP-DB] Auto inc in MySQL

2003-07-09 Thread Leif K-Brooks
Stan Lemon wrote: Also, I believe in addition to AUTO_INCREMENT it has to be UNIQUE as well. Please correct me if I am wrong. No, just INDEX. UNIQUE will work fine, but I reccomend making it PRIMARY. -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to de

Re: [PHP-DB] hmmm

2003-07-04 Thread Leif K-Brooks
Becoming Digital wrote: We have found the only case when banning someone from the list for foul language would be completely undesirable. Making it so he really can't unsubscribe, on the other hand, would be very desirable. Are you listening, admins? :-) -- The above message is encrypted wit

Re: [PHP-DB] Altering a column in an existing table

2003-06-27 Thread Leif K-Brooks
Rick Dahl wrote: I have a column (ID) that is currently not auto_incremental. I need to change it so that it is auto_incremental. There are already records in this column. also, I need to change the field type from int(4) to int(8). Rick 1) This has nothing to do with PHP. 2) This will mos

Re: [PHP-DB] T_String?

2003-06-10 Thread Leif K-Brooks
The "little detail" is the lack of quotes around your query. Jorge L. wrote: I am getting the following error: Parse error: parse error, unexpected T_STRING in C:\Program Files\Apache Group\Apache2\htdocs\view.php on line 4 On line: $result = mysql_query(select * from guestbook) or die (mysql_e

Re: [PHP-DB] strip

2003-06-04 Thread Leif K-Brooks
Don't. addslashes() instead. Chris Mach wrote: does anyone know how to strip a ' from a string? It's causing errors for my sql statements -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.

Re: [PHP-DB] query string

2003-06-02 Thread Leif K-Brooks
To answer your question, you should urlencode() the team name. However, I would store the user in a cookie or session, and fetch the team name on each page load. Otherwise, they can easily change which team they're using. Ian Fingold wrote: Sorry I don't think I explained very well... heres

Re: [PHP-DB] HELP HELP HELP SELECT not work

2003-04-05 Thread Leif K-Brooks
My psychic powers are a bit out of tune, but I think the problem is on line 35 of your code. [EMAIL PROTECTED] wrote: My PHP scripts don't execute the SELECT queries after execute the first. My web execute PHP scripts for work with MYSQL, all on Apache webserver. PHP version: 4.1.2 MySQL vers

Re: [PHP-DB] Can't Insert more than 1 record

2003-04-03 Thread Leif K-Brooks
I haven't used my psychic powers for a while, but I think the problem is on line 35. Keven Jones wrote: Hello All, I am having a problem inserting records into my Database. I am passing fields from a FORM to my php program that adds 1 record to my DB. It will create the first attempt just fine

Re: [PHP-DB] Sharing variable values among PHP files

2003-04-01 Thread Leif K-Brooks
The method posted, using isset(). Leston Drake wrote: For us novices, can you please share how you would do this with register_globals off? At 01:07 AM 4/1/2003, you wrote: The method you posted is for register_gkobals on, which it won'tr always (and shouldn't be)! Ronan Chilvers wrote: Com

Re: [PHP-DB] Sharing variable values among PHP files

2003-04-01 Thread Leif K-Brooks
Please, please, PLEASE don't give advice! If you don't know the answer, DON'T COMMENT! The method you posted is for register_gkobals on, which it won'tr always (and shouldn't be)! Ronan Chilvers wrote: Coments inline... On 01 Apr,2003 at 10:04 Mustafa Ocak wrote: You can store the value

Re: [PHP-DB] Catch Errors

2003-03-30 Thread Leif K-Brooks
www.php.net/mysql-error shaun wrote: Hi, Is it possible to catch the type of error message returned form a mysql_query(); funtion for example if ($error == //duplicate row for table) { echo "This row already exists in the table"; } -- The above message is encrypted with double rot13 enc

[PHP-DB] Generating view of tree?

2003-03-26 Thread Leif K-Brooks
I have a table with a tree. Thing is, I need to generate a view of it like: Category Sub-category Sub-sub-category Another sub-category Another category Sub-category Any way to do this, without using a huge number of queries? Using MySQL. -- PHP Database Mailing List (http://www.ph

[PHP-DB] Passing value in URL to Form

2003-03-09 Thread Stephen K Knight
I have managed to pass information through a URL and extract it and insert it into a form on a php document. Can this be done for an html document? Passing the value through the URL to an html page with form and then through a URL again into a php doc. I tried the same method I used in the php do

[PHP-DB] need to pass info in URL

2003-03-09 Thread Stephen K Knight
Is there a way to pass a value from on html page to another on a different server through a URL and have that value input into a form. The value trying to be passed is a record id from a database. In Kindness Stephen -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http

[PHP-DB] I'm almost there! Just a little more help

2003-03-07 Thread Stephen K Knight
?> If someone could fix this I would greatly greatly apreciate it! In Kindness Stephen K Knight -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] I need some help with php code please

2003-03-06 Thread Stephen K Knight
code below. Can someone please look and help me so that I can upload the image to that folder. Thank you! In Kindness Stephen K Knight \n"; // echo "newname = '" . $newname . "';\n"; // echo "\n"; } -- PHP Database Mailing List (http://

[PHP-DB] Need help with php and apache

2003-03-06 Thread Stephen K Knight
I am currently running on a Windows Box the OS is ME I have installed apache 2.0.44 and I have downloaded the newest PHP download for windows. I have read the configuration manual repeatedly for getting the php into the apache httpd.conf doc file. but I still cannot get php to be recognized. Can a

Re: [PHP-DB] Creating MySQL Entry Forms

2003-02-28 Thread Leif K-Brooks
What's wrong with PhpMyAdmin? Jeremy N.E. Proffitt wrote: I need to create some simple web forms for entering, changing, deleteing information from a fairly simple MySQL database. This is to be for internal use, so doesn't have to be really fancy or have alot of error checking. I could make a

Re: [PHP-DB] selecting random rows

2003-02-27 Thread Leif K-Brooks
select * from table order by rand() limit 2 [EMAIL PROTECTED] wrote: I'm sure this is pretty simple, but I'm having a hard time finding the answer: How do you select two random rows in a mysql table? Thanks, Kent -- The above message is encrypted with double rot13 encoding. Any unauthorized

Re: [PHP-DB] Differences between php3 and php4

2003-02-22 Thread Leif K-Brooks
Y Al Hinai wrote: include(mydata.txt); Should be: include('mydata.txt'); 1. Is there any source (book or URL or whatever) that shows what have been changed between php3 and php4 and what are the new functions or values are? Something like a table or differences in functions. http://www.php.ne

Re: [PHP-DB] disable right-click in all frames.

2003-02-22 Thread Leif K-Brooks
1. Not a PHP question. 2. Definitley not a PHP database question. 3. No, I don't think so. Matt wrote: hey everyone. i have a php script that opens up a new window with multiple frames. i am using javascript to disable the right-click mouse button on the frames. the problem is that on of the fr

Re: [PHP-DB] How to find the autoincremented number?

2003-02-21 Thread Leif K-Brooks
http://www.php.net/manual/en/function.mysql-insert-id.php David Chamberlin wrote: Hey, Most of the tables I use identify things using an id which is auto-generated using autoincrement. However I can't seem to figure out a good way to find what value was generated for the ID. For example, let

Re: [PHP-DB] Ordering...

2003-02-10 Thread Leif K-Brooks
order by col1 asc col2 desc nikos wrote: Hi list! How can I "Order By" in MySQL a column asceding and an other column desceding? Qbit &Ggr;&agr;&tgr;&sgr;&eeacgr;&sfgr; &Ngr;&iacgr;&kgr;&ogr;&sfgr; - Gatsis Nikos

Re: [PHP-DB] heredoc and coding standards

2003-02-03 Thread Leif K-Brooks
I usually do something like this: function somefunction(){ //Do whatever print <<< END Whatever text here END ; } Rob Day wrote: I try to write very clean code. However, there is one thing that always bugs me - using heredoc syntax in a function. Code in the function really should be in

Re: [PHP-DB] form field rejection

2003-02-02 Thread Leif K-Brooks
Try something like this (untested): $phonenumber = '(123)-123-1234'; $phonenumber = preg_replace('/[^0-9]/','',$phonenumber); if(!preg_match('/^([0-9]{3})([0-9]{3})([0-9]{4})$/',$phonenumber,$matches){ die('Invalid phone number.'); } $full_number = $matches[0]; $areacode = $matches[1]; $exchange =

Re: [PHP-DB] Calling functions recursively

2003-01-28 Thread Leif K-Brooks
There are some cases where I see recursive functions as the only option. Picture this function to retrieve data from a global array: $data = array(array('somedata'=>'somevalue','somedata2'=>'somevalue2'),array('somedata'=>'somevalue','somedata2'=>'somevalue2'),array('somedata'=>'somevalue','so

Re: [PHP-DB] function needed

2003-01-27 Thread Leif K-Brooks
function get_domain($domain){ preg_match('/^(www.)?([A-Za-z_-]+).+$/',$domain,$arr); return $arr[2]; } Shahar Tal wrote: Hey I'm looking and wondering for a function, as i'm trying to do something, and here it is. I'm using the SSI call : . to get the domain name I am on. this will outpu

[PHP-DB] Storing previous versions?

2003-01-26 Thread Leif K-Brooks
I'm planning to use a wiki-style help system for my website. I've considered using existing open-source wiki systems, but it would be too much work to get them hooked up with my user system, etc. Like most wikis, previous versions of articles will be stored. I'm looking for ideas as to the b

[PHP-DB] DB design - which table to have a reference from?

2003-01-21 Thread Leif K-Brooks
I'm working on a site, and one feature will require two tables to store data. Records in table1 will sometimes (but not always!) also have an associated record in table2. When considering the design for this, I'm puzzled by one question: which table should reference which? Should the design

[PHP-DB] Getting all rows of a certain column when grouping?

2003-01-18 Thread Leif K-Brooks
I have a table that stores smileys users can use. I'm trying to make a page that lists them in an HTML table something like: || | Smiley | Image | ||---| |:), :-) | IMAGE | |:(, :-( | IMAGE | -- I could use a query something like: select * from smile

Re: [PHP-DB] Mysql Passwprd validation

2003-01-03 Thread Leif K-Brooks
SELECT * from table where passwordfield=PASSWORD('$variablewithpassword') and username='$usernametocheck' limit 1 Sabina Alejandr Schneider wrote: Hello to everybody!! I'm writing to know if somebody knows how can I validate a password that has been encrypted with the PASSWORD() mysql functio

[PHP-DB] Re: [PHP] Limit to size of autoindex in MySQL/PHPMyAdmin?

2003-01-03 Thread Leif K-Brooks
The limit to tinyint is 255... use int. Jim MacCormaic wrote: Hi all. I'm new here, currently implementing my first PHP/MySQL website on an iMac running Mac OS X v.10.2.3. All has been going really well until just now while I was adding records to the MySQL database. I have a table which incl

Re: [PHP-DB] Cannot add header information error

2002-12-26 Thread Leif K-Brooks
You can't add headers after you've outputted anything. Without seeing the class page, I'd guess there's a space after the ?>. Either remove that or use output buffering. Petre NICOARA wrote: Hi guys I have this error when I tried to use a sign-up form. The thing is that I use some classes for

Re: [PHP-DB] Checking if number is in bottom three?

2002-12-23 Thread Leif K-Brooks
ct myfield from table order by myfield DESC limit 3 That will return the last 3 records in your database where the highest number is the last. Think of it as sorting by that number in reverse and only returning the first 3. Cheers Jason -Original Message- From: Leif K-Brooks [mai

[PHP-DB] Checking if number is in bottom three?

2002-12-23 Thread Leif K-Brooks
I need a way to check if a number is in the bottom three of a column in my database. For example, if I had a list of number in my table like this: 1 5 8 12 60 1 10001 I might need to know if 5 was in the bottom three, which it would be. But if I checked 60, it wouldn't be. I could check the

Re: [PHP-DB] Set Logout Time for No Activity

2002-12-19 Thread Leif K-Brooks
Log out, meaning what? Using sessions? Cookies? Allens wrote: Hello, Is there a variable in php.ini that will allow you to log someone out if there is no activity of 30 minutes or greater from the logged in user? Thanks in advance. :) :) Gale L. Allen Jr Macintosh Support Specialist 86

Re: [PHP-DB] Making field concat of autoincrement column and othervalues?

2002-12-01 Thread Leif K-Brooks
I'm trying to make a customised session system (I could use PHP's built-in one, but I need a lot more control than it offers). I could use the autoincremented id in a cookie, but it would be easy for a hacker to change the cookie to gain access to others' data. John W. Holmes wrote: I could c

Re: [PHP-DB] Making field concat of autoincrement column and othervalues?

2002-12-01 Thread Leif K-Brooks
I could concat when selecting, but it will be used in the where clause (it is neccesary to do it like this, I'm also md5ing it but forgot to mention that), and I'm guessing it would be bad for the server to have to concat and md5 in the where clause. John W. Holmes wrote: I'm trying to make a

[PHP-DB] Making field concat of autoincrement column and other values?

2002-12-01 Thread Leif K-Brooks
I'm trying to make a field in my database table a concat of an autoincrement value and some other values. I'm trying: insert into table set val1='val1',val2='val2',concatfield=concat('whatever',id,'whatever'), but it doesn't work. Is there another way, or will I have to update the row directl

Re: [PHP-DB] Assign a variable with another variables value

2002-12-01 Thread Leif K-Brooks
$foo = "BAR"; $varname = "new$foo"; $$varname = "some string"; Martin Allan Jensen wrote: Hi folks, I probably need a little help the next couble of days, but well here is the first question. How can i assign a variable with the value of another variable ?? Example: $foo = "BAR"; $newBAR = "

Re: [PHP-DB] Deleting topics older than 2 hours?

2002-11-24 Thread Leif K-Brooks
Sounds to me like you didn't understand the question. The table structure is something like: topics_ | id | forum | author | subject | posttime | - _posts | id | topic | author | message | posttime| -

[PHP-DB] Deleting topics older than 2 hours?

2002-11-24 Thread Leif K-Brooks
I'm trying to run a cron job to delete forum topics more than 2 hours old. I know how to do that, but the problem is also deleting the posts in the topic at the same time. Can someone shed some light on this, please? -- The above message is encrypted with double rot13 encoding. Any unauthoriz

Re: [PHP-DB] Really dumb question... deleting everything but newest100 rows?

2002-11-23 Thread Leif K-Brooks
t http://www.phparch.com On Sat, 2002-11-23 at 17:38, Leif K-Brooks wrote: I know this is a dumb question, but how would I delete everything but the first 100 results returned from a query? I know I'd use limit, but my mind's going blank as to the exact syntax. -- The above message i

[PHP-DB] Really dumb question... deleting everything but newest 100 rows?

2002-11-23 Thread Leif K-Brooks
I know this is a dumb question, but how would I delete everything but the first 100 results returned from a query? I know I'd use limit, but my mind's going blank as to the exact syntax. -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will b

Re: [PHP-DB] session in php 4.2.3

2002-11-12 Thread Leif K-Brooks
My guess is a register_globals problem, but it's hard to tell without seeing your scripts. dn wrote: Hi! I have to support a PHP-Database-solution which someone else has developed. In addition I'm quite new to php ... It uses Oracle 8 to display values out of the database. Everything is runnin

[PHP-DB] Pgsql Vs. Mysql

2002-11-11 Thread Leif K-Brooks
Sorry for the off-topic post, but it would be highly annoying to have to subscribe to a new mailing list for just one topic. I'm currently using mysql, but I'm considering switching to pgsql. I'm wondering which is better. Also, how hard would Pgsql be to install? Php seems to have pgsql suppo

Re: [PHP-DB] Performance for how many columns to update?

2002-11-10 Thread Leif K-Brooks
ecause you can delay your updates which allows MYSQL to update the table at its leisure which offers better performance. Peter, who reminds you to always read the manual (or less kindly RTFM!). On Sun, 10 Nov 2002, Leif K-Brooks wrote: I'm wondering how significant the performance difference

[PHP-DB] Performance for how many columns to update?

2002-11-10 Thread Leif K-Brooks
I'm wondering how significant the performance differences between: mysql_query("update table set col1='val1' where whatever='whatever'"); and mysql_query("update table set col1='val1',col2='val2',col3='val3'... where whatever='whatever'"); -- The above message is encrypted with double rot13 encod

Re: [PHP-DB] Polls?

2002-11-08 Thread Leif K-Brooks
stion}"); while ($r = mysql_fetch_array($question)) { $answers = mysql_query("select * from answers where qid={$r[id]}"); while ($s = mysql_fetch_array($answers)) { print ""; } } On Fri, 8 Nov 2002, Leif K-Brooks wrote: I'm working on a polling system, and

Re: [PHP-DB] Polls?

2002-11-07 Thread Leif K-Brooks
atius - Original Message - From: "Leif K-Brooks" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, November 08, 2002 8:15 AM Subject: [PHP-DB] Polls? I'm working on a polling system, and I'm having a bit of a problem. I'm not sure how

[PHP-DB] Polls?

2002-11-07 Thread Leif K-Brooks
I'm working on a polling system, and I'm having a bit of a problem. I'm not sure how to store the questions. Storing them in a seperate table would require a query for each poll displayed - not good. I've also thought of storing them as a serialized array. Any thoughts on this? -- The above

Re: [PHP-DB] Abstraction layer or not?

2002-11-05 Thread Leif K-Brooks
True, but a DB wrapper can do the error reporting as well. John W. Holmes wrote: I'm working on a new site, and I'm wondering whether to use an abstraction layer or not. I don't have any plans to switch DB system, but you never know what the future holds. I figure that there's no reason not to

[PHP-DB] Abstraction layer or not?

2002-11-05 Thread Leif K-Brooks
I'm working on a new site, and I'm wondering whether to use an abstraction layer or not. I don't have any plans to switch DB system, but you never know what the future holds. I figure that there's no reason not to, but are there any down sides? Which abstraction layers are good? -- The abov

[PHP-DB] Getting affected rows before executing query?

2002-11-03 Thread Leif K-Brooks
I keep forgetting where clauses. It's my dumbest mistake, and I always make it. I just lost the password of everyone on my site trying to change my own - not good. Anyway, I'm trying to edit PhpMyAdmin to warn if there's more than a certain number of affected rows for a query. Is there a wa

Re: [PHP-DB] Re: Performance problems?

2002-11-01 Thread Leif K-Brooks
Aha - thanks. The problem is, I also need to retrieve other data asscociated with it. I'll alter the table to order by id, but is there anything long-term I can do? Manuel Lemos wrote: Hello, On 11/02/2002 03:21 AM, Leif K-Brooks wrote: I've been optimizing scripts in an attemp

[PHP-DB] Performance problems?

2002-11-01 Thread Leif K-Brooks
I've been optimizing scripts in an attempt to speed my friend's site up, and I believe I've found the source of the performance problems. When I comment the following page load time changes from around 6 seconds to less than .5 of a second. if($loggedin){ $events = mysql_query("selec

[PHP-DB] Multiple table select, but still returning row if no record existsin second table?

2002-10-30 Thread Leif K-Brooks
I'm using mysql. Is there any way to do a multiple-table select, but still return the results from table 1 if there are no matching rows in table 2? Something like "select table1.something,table2.something as something2 from table1,table2 where table1.table2id = table2.id" will only return th

[PHP-DB] Converting database from MS Access

2002-10-29 Thread Soma Shekhar K
Sir, Can u pls help in "Converting database from MS Access to MySQL on Linux". Pls send the code for converting. Bye Som __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ -- PHP Database Mailing List (http://www.p

[PHP-DB] Converting database from MS Access to MySQL on Linux

2002-10-29 Thread Soma Shekhar K
Sir, Can u pls help in "Converting database from MS Access to MySQL on Linux". Pls send the code for converting. Bye Som __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ -- PHP Database Mailing List (http://www.php

Re: [PHP-DB] The Ethics and Access of Login

2002-10-28 Thread Leif K-Brooks
That's a HUGE security flaw! Anyone could send that in a GPC value and get unauthorized access! USE $_SESSION['login'] INSTEAD!!! Daevid Vincent wrote Then at the top of each page, just check if they're logged in or not. if( !$login ) { Header("Location: ".$LOGINPAGE."\n\n"); exit; } --

[PHP-DB] Mysql too many connections?

2002-10-28 Thread Leif K-Brooks
Is there any way to change how many connections mysql allows? I keep getting the too many connections error... (not using pconnect) -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP Da

[PHP-DB] Getting rows where column has changed?

2002-10-26 Thread Leif K-Brooks
I'm trying to make a page to help in detecting people using automatic refresher programs. In the table that stores user info, there is a column called "lastseen" which says when the user was last seen. I'm trying to: 1. Select all lastseen colmns that are less than 5 minutes old 2. Wait 2 seco

[PHP-DB] Adding 1 day to date/datetime/timestamp?

2002-10-23 Thread Leif K-Brooks
I need to add one day to a datetime/date/timestamp field. How would I do this? (sorry for the n00b-ish question...) I'm using mysql. -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP

[PHP-DB] Getting valie between two fields? (mysql)

2002-10-16 Thread Leif K-Brooks
I have a table something like this: __ | id | number | | 1 | 1 | | 2 | 23| | 3 | 59| | 4 | 103 | If I have a number, say 30, I need to get the last number it's above - in this case id 2. Any ideas? -- The above message is encrypted with double rot13 e

Re: [PHP-DB] Accessing data from next row? (mysql)

2002-10-14 Thread Leif K-Brooks
I know that, but what if I need to access data from the next row? If I have 3 rows, is there a way to access something from row 3 while the loop is in row 2, but still have the loop go to row 3 when it's done with row 2? John W. Holmes wrote: >>Using mysql, how do I access the data of the ne

[PHP-DB] Accessing data from next row? (mysql)

2002-10-14 Thread Leif K-Brooks
Using mysql, how do I access the data of the next row using code something like this: $result = mysql_query("select column from table where whatever='whatever'"); while($array = mysql_fetch_array($result)){ //Whatever } -- The above message is encrypted with double rot13 encoding. Any unauthor

[PHP-DB] Random numbers with range in mysql?

2002-09-28 Thread Leif K-Brooks
I'm trying to make "shops" that sell virtual objects. They restock once every 15 minutes. This is all set up. The problem is, I would like to have objects in these shops with a random chance of being restocked. My idea is to store two numbers in the restock list: chance, and outof. (For a

[PHP-DB] Categorized list?

2002-09-26 Thread Leif K-Brooks
I'm trying to create a system to store virtual "objects". Each object will be in a category, and the categories may be in other categories. The categorie list might look something like: Food Candy Healthy Food Vegeterian food Organic food Gross food I'm thinking of

Re: [PHP-DB] Caculating minutes since DATETIME column?

2002-09-26 Thread Leif K-Brooks
ESTAMP(NOW()) - UNIX_TIMESTAMP(your_column)) / 60 John Holmes wrote: >SELECT UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(your_column) / 60 AS >Minutes FROM your_table > >---John Holmes... > > > >>-----Original Message- >>From: Leif K-Brooks [mailto:[EMAIL PROTECTED]]

[PHP-DB] Caculating minutes since DATETIME column?

2002-09-26 Thread Leif K-Brooks
I need a way to calculate the number of minutes since the value of a DATETIME column in mysql. Any ideas? Thanks. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Script to control mysql users?

2002-08-29 Thread Leif K-Brooks
I need to add mysql users to some databases, but my dumb control panel (ensim) doesn't seem to have a feature to do that, and I'm nothing in the mysql database. Does anyone have a script to let me add them automaticly if I supply it with the root password? -- PHP Database Mailing List (http

Re: [PHP-DB] Database abstraction layer needed?

2002-08-17 Thread Leif K-Brooks
need one? > >~MET > >-Original Message- >From: Leif K-Brooks [mailto:[EMAIL PROTECTED]] >Sent: Saturday, August 17, 2002 3:28 PM >To: [EMAIL PROTECTED] >Subject: [PHP-DB] Database abstraction layer needed? > > >I'm redoing my web site, and I'm c

[PHP-DB] Database abstraction layer needed?

2002-08-17 Thread Leif K-Brooks
I'm redoing my web site, and I'm considering using a db abstraction layer. Would I need one, and should it be db-type specific (like, can just do one db type)? I don't plan to change database types. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

[PHP-DB] Good mysql abstraction layer class?

2002-08-15 Thread Leif K-Brooks
I'm completley reprogramming my site, and I'm looking for a good mysql abstraction layer. I want something that basicly works just like the normal mysql functions (something like $classvar->function(), rather than mysql_function()). Any ideas? -- PHP Database Mailing List (http://www.php.n

[PHP-DB] Re: results of mysql_fetch are returning the incorrect records

2002-08-15 Thread K. Lee
I tried echo the sql in this function but I do not know where it print the statement. This function is inside *.inc file which is require in the html that I am printing the results of the query. So, to answer your question, I using the data to display on a html page. I am returning an array fro

[PHP-DB] results of mysql_fetch are returning the incorrect records

2002-08-13 Thread K. Lee
I have problems with mysql_fetch return the wrong records. If I execute the sql statement in mysql, I receive the correct results. When I used mysql_fetch function, it does not return the correct results. Below is my function and the format sql statement function companiesByBusiness_ZipCode_Bu

[PHP-DB] create a file (simple)

2002-08-10 Thread K. Lee
This is my first using php. I trying to do something by creating file to see the sql statement I am sending to my database. I assuming php does not have way throw up a simple message box. Anyway, if I could get this file to create that would be great. Any help would be appreciated. function wr

[PHP-DB] create file (simple)

2002-08-10 Thread K. Lee
I am new at php. I trying to debug my code. So, I am trying to print out my sql statement to a file to make sure the syntax is correct. I trying to find a way to print out to a message box or something. I guess php does not have that capability or I cannot find the function that will help me d

  1   2   >