RE: [PHP-DB] 2nd Pair of eyes please

2011-01-26 Thread Daevid Vincent
> -Original Message- > From: Donovan Brooke [mailto:li...@euca.us] > Sent: Wednesday, January 26, 2011 2:35 PM > To: php-db@lists.php.net > Subject: [PHP-DB] 2nd Pair of eyes please > > O.K., I give up.. I can't seem to find why this breaks the page to > a point where nothing gets disp

[PHP-DB] PEAR:DB affectedRows() returns wrong value

2010-11-30 Thread Daevid Vincent
This took me a while to figure out but I'm fairly confident that http://pear.php.net/manual/en/package.database.db.db-common.affectedrows.ph p Returns the wrong number. I know this package is old and depricated, but I thought I'd throw this out to the ether so that if someone else is searching, t

[PHP-DB] FW: Get The Facts: MySQL Licensing & Pricing

2010-11-10 Thread Daevid Vincent
-Original Message- From: Monica Kumar [mailto:monica.ku...@oracle.com] Sent: Wednesday, November 10, 2010 11:52 AM To: annou...@lists.mysql.com Subject: Get The Facts: MySQL Licensing & Pricing We just posted the following blog entry on Oracle's MySQL Blog: http://blogs.oracle.com/mysq

RE: [PHP-DB] finding out if a user left our website ?

2010-08-25 Thread Daevid Vincent
Well look at that. Check out this one too: "window.onbeforeunload" http://www.hunlock.com/blogs/Mastering_The_Back_Button_With_Javascript > -Original Message- > From: kesavan trichy rengarajan [mailto:k...@trk7.com] > Sent: Wednesday, August 25, 2010 2:54 PM > To: Vinay Kannan > Cc: PHP

RE: [PHP-DB] finding out if a user left our website ?

2010-08-25 Thread Daevid Vincent
> -Original Message- > From: Vinay Kannan [mailto:viny...@gmail.com] > > Wanted to know if there is a way for us to find out, when a > user moves away > from our website( closing the window and entering a different > url in the address bar ) > > closing the window i guess, we could use

RE: [PHP-DB] Slashes or no slashes

2010-08-19 Thread Daevid Vincent
You should be using http://us2.php.net/manual/en/function.mysql-escape-string.php You don't need to search with extra slashes for retrieval. > -Original Message- > From: Karl DeSaulniers [mailto:k...@designdrumm.com] > Sent: Thursday, August 19, 2010 2:29 PM > To: php-db@lists.php.net >

RE: [PHP-DB] input statement in php

2010-07-26 Thread Daevid Vincent
> -Original Message- > From: Bavithra R [mailto:bavithr...@gmail.com] > Sent: Monday, July 26, 2010 7:39 AM > To: php-db@lists.php.net > Subject: [PHP-DB] input statement in php > > hi friends.. > > > Is there any equivalent statement in php for "scanf" or > "cin" in c or c++? > That

[PHP-DB] FW: semaphores WAS: [PHP-DB] Automatic logoff

2010-01-28 Thread Daevid Vincent
> -Original Message- > From: Richard Quadling [mailto:rquadl...@googlemail.com] > Sent: Thursday, January 28, 2010 3:48 AM > To: listread > Cc: php-db@lists.php.net > Subject: Re: [PHP-DB] Automatic logoff > > On 27 January 2010 17:20, listread wrote: > > Richard, > > > > I think I ne

[PHP-DB] FW: Oracle Finalizes Acquisition of Sun

2010-01-27 Thread Daevid Vincent
To ensure delivery directly to your inbox please add repl...@oracle-mail.com to your address book today. Oracle Corporation We are pleased to announce that Oracle

RE: [PHP-DB] Role Based Access Control and Role Based Security

2010-01-25 Thread Daevid Vincent
=> TRUE, 'P_device_add' => TRUE, 'P_device_save' => TRUE, 'P_device_import' => TRUE, 'P_discovery_run' => TRUE, 'P_daterange_delete'

[PHP-DB] FW: Help keep the Internet free -- MySQL petition to EU

2009-12-29 Thread Daevid Vincent
-Original Message- From: Michael Widenius [mailto:mo...@askmonty.org] Sent: Tuesday, December 29, 2009 5:00 AM To: my...@lists.mysql.com Subject: Help keep the Internet free Hi! We have just launched a worldwide, multilingual petition at http://helpmysql.org to get signatures to show th

RE: [PHP-DB] Displaying Password - orale...

2009-12-22 Thread Daevid Vincent
> Guess I should have kept that question to myself and dove into the manuals a little more, but > didn't think I would get crucified for asking help. Everyone has to > start somewhere and no one knows everything when they start. Let me apologize. I didn't mean to chastise you specifically. That

RE: [PHP-DB] Displaying Password - oy vey...

2009-12-22 Thread Daevid Vincent
> > You can't be serious with that?! LOL. Exactly what I was thinking. W.T.F? http://www.youtube.com/watch?v=pXhKzY0BKwY > > You should try The next code: > > > > $UserPassword = str_repeat("•", strlen($UserPassword)); > > > > Enjoy. (I hope that you are not a programmer) ...and this is why goo

RE: [PHP-DB] UPDATE instead of INSERT INTO

2009-09-08 Thread Daevid Vincent
http://dev.mysql.com/doc/refman/5.0/en/replace.html Or as previously mentined: http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html > > -Original Message- > > From: Ron Piggott [mailto:ron@actsministries.org] > > Sent: Saturday, September 05, 2009 1:19 PM > > To: php-

RE: [PHP-DB] how to store a heirarchy of resellers and customers WAS: newbie help

2007-10-01 Thread Daevid Vincent
Also, you really should use a more descriptive subject line, 'newbie help' is kind of weak. If everyone did that, nobody would be able to search subjects or distinguish one topic from another. I won't even get into the whole 'top/bottom post' B.S. (personally I think top posting is great as you d

RE: [PHP-DB] newbie help

2007-10-01 Thread Daevid Vincent
This may be overkill for what you're doing, but based upon your layout, you might consider a nested set. Since you're a newb, it may be too complex to code: http://dev.mysql.com/tech-resources/articles/hierarchical-data.html This is how you setup products and categories for example I think your s

RE: [PHP-DB] Integer in DB becomes string in PHP?

2007-08-27 Thread Daevid Vincent
You could use intval($row['number']); to force it, but be careful that you may hit upper bounds around 2 Billion as integers are always signed in PHP (unfortunately), and mysql lets you store unsigned. It'll also depend on your OS. If you're checking the value only, you can use is_numeric($row['nu

RE: [PHP-DB] Are PHP & MySQL acceptable for the website I want to make

2007-06-06 Thread Daevid Vincent
Not rain on your parade, but uh... Why would you re-invent the wheel?! A quick Google search for "reminder sites" turns up 4.8million hits, including canned ones for $35 for an entire site to use as you wish! http://www.easyturnkeysites.com/catdisplay.php?category=Reminder%20Websi tes http://ww

RE: [PHP-DB] Creating all key combinations passwords

2007-05-21 Thread Daevid Vincent
> -Original Message- > From: Stut [mailto:[EMAIL PROTECTED] > Sent: Sunday, May 20, 2007 8:45 AM > To: Lasitha Alawatta > > Lasitha Alawatta wrote: > > I’m going to create all key combinations; simple-letter > passwords and > > store those in to MySql DB. > > > > Using = a-z (simple le

[PHP-DB] RE: How do I find products when a user types freeform strings like 'Sony 20" TV' or '20" Sony TV'? [SOLVED]

2007-05-10 Thread Daevid Vincent
> -Original Message- > From: Daevid Vincent [mailto:[EMAIL PROTECTED] > Sent: Friday, May 04, 2007 1:22 AM > To: [EMAIL PROTECTED] > Subject: How do I find products when a user types freeform > strings like 'Sony 20" TV' or '20" Sony TV'

[PHP-DB] What's the PHP equivallent of "mysql mydb < somefile.sql"

2006-10-09 Thread Daevid Vincent
Currently I run an 'updater' script to run through a directory of .sql files using something like this in PHP: $COMMAND = "mysql ".$OPTION['db_prefix'].$db." < ".$mydir.$filename; system($COMMAND, $ret); What would be the equivallent way to to this in a PHP mysql_query(""); way?

[PHP-DB] [ANNOUNCE] dumpster :: dumps out all related records in a mySQL InnoDB database

2006-07-12 Thread Daevid Vincent
Hey all. Well I just finished my first version of a little tool I have affectionately dubbed "dumpster". I do use my own SQL wrapper functions, but they should map fairly cleanly to a search and replace for the stock mysql_*() ones, or your own ones. Mad props to Peter Brawley [EMAIL PROTECTED]

RE: [PHP-DB] Help needed creating a social network

2006-03-07 Thread Daevid Vincent
serID={$f['userID']}'>{$f['name']} >\n"; > } > > publish(); > profit($greatly); > do (!$use) { > coldfusion('Cause it sucks'); > } > ?> > > (har har) > > > > > > > > On Monday 06 March 2006 9:4

[PHP-DB] Help needed creating a social network

2006-03-06 Thread Daevid Vincent
Anyone have some pointers at a HowTo on creating a social network? Basically I need to show people in your immediate network, and also friends of your friends, etc... Like the whole 'six degrees of separation' thing. Ala: myspace, friendster, etc. ad nauseum. I prefer mySQL and PHP, but I could p

[PHP-DB] RE: [PHP] "Nested Set Model" or "modified preorder tree traversal" [SOLVED]

2006-03-02 Thread Daevid Vincent
olean $deleteChildren (false) otherwise move all the subcategories up to the level of the deleted category * @author Daevid Vincent [EMAIL PROTECTED] * @version 1.1 * @date 03/01/06 */ function delete_category($category = null, $deleteChildren = false) { if (is_null($category))

[PHP-DB] RE: [PHP] "Nested Set Model" or "modified preorder tree traversal" [SOLVED]

2006-03-01 Thread Daevid Vincent
rks as an attachement. D.Vin > -Original Message----- > From: Daevid Vincent [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 22, 2006 12:42 PM > To: 'Curt Zirzow'; php-general@lists.php.net > Subject: RE: [PHP] "Nested Set Model" or "modified preo

RE: [PHP-DB] Wait Statement... ?

2004-07-21 Thread Daevid Vincent
: [PHP-DB] Wait Statement... ? > > Every time someone tries to authenticate, you count the number of > failures in both queues. The larger the number, the longer the sleep > will take. (removing old entries once in a while might speed > up things) Daevid Vince

RE: [PHP-DB] Wait Statement... ?

2004-07-21 Thread Daevid Vincent
I'd just DoS it, not waste time locking individual users out one at a time. Daevid Vincent Senior Engineer / Architect two.zero.six.two.eight.five.eight.zero.eight.zero _ _ _ | |___ ___| | | | _ ___ __ | | /

RE: [PHP-DB] Wait Statement... ?

2004-07-20 Thread Daevid Vincent
Similarly, I could adjust my brute force attack to sleep() a pre-determined amount of time too ;-) The whole 'sleep()' idea just seems silly. I agree with Jason. Just validate and be done. A better way to stop attacks is to have a tally of failed logins if you really are that worried someone is go

[PHP-DB] Can I use PHP with SSL to connect to mySQL?

2004-01-14 Thread Daevid Vincent
I see that mySQL has SSL support: http://www.mysql.com/doc/en/Secure_connections.html And PHP has some SSL support, but do the mysql() functions work transparently with SSL? It seems there would have to be a flag for this mysql_connect() that turned on SSL. http://us4.php.net/manual/en/function.my

RE: [PHP-DB] Cronjob

2003-12-12 Thread Daevid Vincent
One thing I might suggest is to queue up your inserts, then use the extended insert syntax to populate several records at once in a single INSERT instead of 12 separate ones. I believe you can alter the /etc/my.cnf file to play more 'nice' as far as priorities and memory, but I've never touched it

[PHP-DB] Generating UPDATE in loop, how to deal with pesky comma - SOLVED

2003-11-28 Thread Daevid Vincent
l loop until sql is built } $SQL = "UPDATE table SET ".implode(',',$upd)." WHERE blah = 3"; //now do it $result = mysql_query($SQL,$db); Daevid Vincent http://daevid.com > -Original Message- > From: Daevid Vincent [mailto:[EMAIL PROTECTED] > S

[PHP-DB] What is the proper way to use mysql db on a multipage site?

2003-09-24 Thread Daevid Vincent
to keep making that mysql_connect(). Isn't there a way to store the $db result so I don't have to keep connecting. And how about the mysql_select_db() part too? Since I'm going to stay in the same db most of the time. I thought I read that I can't use a $_SESSION for it, and th

RE: [PHP-DB] Re: MMCache Benchmarks don't show much improvement?

2003-08-20 Thread Daevid Vincent
n't show much improvement? > > > Hello, > > On 08/20/2003 09:10 PM, Daevid Vincent wrote: > > Hello, I installed MMCache on one of our boxes here and did > a few timing > > tests. I have to say I'm very unimpressed given the hype > and the benchmark

RE: [PHP-DB] Re: mount command with php in through the web

2003-08-20 Thread Daevid Vincent
You could use sudo and add 'apache' as a user who can run 'mount'... Add this to /etc/sudoers: apache ALL=NOPASSWD: /bin/mount Daevid Vincent http://daevid.com > -Original Message- > From: pete M [mailto:[EMAIL PROTECTED] > Sent: Friday,

[PHP-DB] MMCache Benchmarks don't show much improvement?

2003-08-20 Thread Daevid Vincent
Hello, I installed MMCache on one of our boxes here and did a few timing tests. I have to say I'm very unimpressed given the hype and the benchmarks on their servers. Am I missing something? (and yes, phpinfo() shows the module is loaded). I was the only person hitting the pages on this test box. F

RE: [PHP-DB] HEAP table

2003-07-08 Thread Daevid Vincent
Or instead of creating a table and tying up one more mysql thread, just save the timestamp in a file. This could be as simple as that, you could use XML, you could use INI parser, you could use any number of things. Also, if the HEAP is created per "session", then just store that timestamp in a ses

RE: [PHP-DB] CRiMson live demo and .tgz available

2003-05-27 Thread Daevid Vincent
sage- > From: Matthew Moldvan [mailto:[EMAIL PROTECTED] > Sent: Saturday, May 24, 2003 1:01 PM > To: 'Daevid Vincent'; [EMAIL PROTECTED] > Subject: RE: [PHP-DB] CRiMson live demo and .tgz available > > > I've been trying to install this for about 30 minutes

RE: [PHP-DB] DB CODEING HELP!!!!!

2003-03-23 Thread Daevid Vincent
Here, this will pull data and make a select box. Adjust as needed. $result = mysql_query("SELECT company_id, company_name FROM company_table ORDER BY company_name", $db); if (mysql_num_rows($result) > 0) { echo "\n\t\n"; while ( $row = mysql_fetch_array($result,MYSQL_ASSOC) )

RE: [PHP-DB] Re: Get MySQL table schema for a dump

2003-02-28 Thread Daevid Vincent
The wrap it in an exec() or one of the other exec type functions ;) $result = exec("mysqldump -uMyUser -pMyPass MyDB > db_dump_file.sql"); > -Original Message- > From: Jonathan Villa [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 26, 2003 3:36 PM > To: [EMAIL PROTECTED] > Subject

RE: [PHP-DB] Unlimited Categories

2003-01-15 Thread Daevid Vincent
Well, I'm not sure if you actually truly mean "unlimited", because if you do, be aware that when you define those fields: # BIGINTUNSIGNED = 8 Byte = = 18446744073709551615 # INT UNSIGNED = 4 Byte = = 4294967295 # MEDIUMINT UNSIGNED = 3 Byte = FF = 167

RE: [PHP-DB] How can I use PHP to duplicate a mysql template database? [hack] bug

2002-12-17 Thread Daevid Vincent
DAMNIT! This method copies the data, but doesn't copy 'Extra' stuff like "auto_increment". UGH!!! > -Original Message- > From: Daevid Vincent [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, December 17, 2002 2:33 AM > To: [EMAIL PROTECTED] > Su

RE: [PHP-DB] How can I use PHP to duplicate a mysql template database? [hack]

2002-12-17 Thread Daevid Vincent
("V2_Template"); while ($row = mysql_fetch_row($tableResult)) { $tsql = "CREATE TABLE ".$V2DB.".".$row[0]." AS SELECT * FROM V2_Template.".$row[0]; echo $tsql."\n"; $tresult = mysql_query($tsql,$linkI); if (!$tresul

[PHP-DB] How can I use PHP to duplicate a mysql template database?

2002-12-16 Thread Daevid Vincent
I need to use PHP to duplicate the schema of a database. This seems like it should be a simple task -- taking a 'template' db and cloning it with a new name. I've tried things like: $filename = "myDB.sql"; $fd = fopen ($filename, "r"); $sql = fread

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

2002-10-28 Thread Daevid Vincent
Brooks [mailto:eurleif@;buyer-brokerage.com] > Sent: Monday, October 28, 2002 9:08 PM > To: Daevid Vincent > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP-DB] The Ethics and Access of Login > > > That's a HUGE security flaw! Anyone could send that in a GPC > value and > get unau

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

2002-10-28 Thread Daevid Vincent
Well, what I would suggest is you log them in once, then set a session variable such that $_SESSION["login"] = true; Then at the top of each page, just check if they're logged in or not. if( !$login ) { Header("Location: ".$LOGINPAGE."\n\n"); exit; } No hit to the db for every page. If you're

RE: [PHP-DB] drop down menu

2002-05-30 Thread Daevid Vincent
I use this function: function ListboxMatch($size, $name, $query, $matchtothis) { //echo "".$query.""; if ( $qry = mysql_query($query) ) { if (mysql_num_rows($qry) > 0) { ech

RE: [PHP-DB] ODBC again

2001-04-05 Thread Daevid Vincent
shouldn't that be: $result1 = odbc_prepare($conn, "SELECT * FROM PERSONAS WHERE email = '$v_mail'"); you have your double quotes at the end in the wrong place. they should be before the ") not after )" daevid.com > -Original Message- > From: Fernando Buitrago [mailto:[EMAIL PROTECTED]]

RE: [PHP-DB] PHP4.0.4 segfaults with odbc_pconnect

2001-04-03 Thread Daevid Vincent
s the OS picks from and will 'map' them correctly (in lay terms). and FWIW, the PHP example STILL segfaults. I would expect it to through up an error, not segfault... that can't be good can it? daevid.com > -----Original Message- > From: Andrew Hill [mailto:[EMAIL PROTECT

[PHP-DB] PHP4.0.4 segfaults with odbc_pconnect

2001-04-02 Thread Daevid Vincent
I've tried this with both PHP4.0.4 and PHP4.0.4pl1 as a module (it's for a daily script eventually). [root=pts/1]7:29pm@content:{/www/html/private/TattooShop}> ./odbc-test2.phtml #!/bin/php -q Segmentation fault the relevant part of phpinfo(); is below, so I'm assuming that I finally got odbc co

RE: [PHP-DB] help with compiling ODBC into PHP4

2001-04-02 Thread Daevid Vincent
ons.lo] Error 1 make[2]: Leaving directory `/data/usr/src/WT_Apache_Setup/php-4.0.4/main' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/data/usr/src/WT_Apache_Setup/php-4.0.4/main' make: *** [all-recursive] Error 1 thank you for your continued help. > -Original

RE: [PHP-DB] RE: [PHP] RE: what exactly are /path/to/blah lookingfor? .h? .so? .a? what?!

2001-03-31 Thread Daevid Vincent
figure" is just a shell script with make clean, all my --options, make, make install, since I have to compile in mysql, and some other stuff. > -Original Message- > From: Andrew Hill [mailto:[EMAIL PROTECTED]] > Sent: Friday, March 30, 2001 4:00 PM > To: Daevid Vincent; [EM

[PHP-DB] RE: [PHP] RE: what exactly are /path/to/blah looking for? .h? .so? .a? what?!

2001-03-30 Thread Daevid Vincent
csdk/doc: total 16 -rw-r--r--1 nobody html 773 Mar 7 14:42 odbcinst.ini -rw-r--r--1 nobody html 1010 Mar 7 14:42 odbc.ini -rw-r--r--1 nobody html 5127 Mar 7 14:42 odbc.doc > -Original Message- > From: Andrew Hill [mailto:[EMAIL PROTECTED]

[PHP-DB] what exactly are /path/to/blah looking for? .h? .so? .a? what?!

2001-03-30 Thread Daevid Vincent
> I'm having difficulties with that line: > > ./configure --with-openlink=/path/to/openlink/ > --with-iodbc=/path/to/iodbc/ so I've tried every combination I can think of related to "iodbc" and "openlink", and none of these are compiling. Every one results in "No such file or director

RE: [PHP-DB] how do I connect to MSSQL2000 and mySQL with PHP4 and Linux?

2001-03-29 Thread Daevid Vincent
> The Quick and Dirty instructions are > > 1. download the iODBC sdk from www.iodbc.org, can you give me the EXACT URL's for EVERYTHING I need to download and install re: ODBC I have RedHat 6.2, (so glibc2) > 2. add --with-iodbc=/path/to/iodbc in to your configure I'm having difficulties with t

RE: [PHP-DB] how do I connect to MSSQL2000 and mySQL with PHP4 and Linux?

2001-03-29 Thread Daevid Vincent
> By the way, I understand there are major issues with SQL2000 server. In > that case, ODBC might be a better choice. Figures, that's the version we're using... So what all is involved with getting ODBC to work. Also, in case this wasn't obvious, I'm trying to connect from the PHP/Apache/Linux

[PHP-DB] how do I connect to MSSQL and mySQL with PHP4 and Linux?

2001-03-28 Thread Daevid Vincent
I run Apache, PHP4, RH Linux, and mySQL currently. Everything is fine. What I need to do is get Microsoft SQL Server in there as well. I see this FreeTDS thing (www.freetds.org), but do I really need that? I don't even know what it is really? The 'FAQ' is not very informative for a 'novice'. It s