Re: [PHP-DB] Incrementing Primary Key

2010-10-27 Thread Max E.K
- Original Message - From: Richard Quadling rquadl...@gmail.com To: Ethan Rosenberg eth...@earthlink.net Cc: php-db-lists.php.net php-db@lists.php.net Sent: Wednesday, October 27, 2010 4:10:52 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: Re: [PHP-DB

Re: [PHP-DB] Books

2010-10-27 Thread Bastien
On 2010-10-27, at 8:20 PM, Ethan Rosenberg eth...@earthlink.net wrote: Dear List - Is anybody aware of any books on PROCEDURAL PHP programming, NOT OO. Thanks. Ethan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Php

Re: [PHP-DB] Incrementing Primary Key

2010-10-27 Thread Ethan Rosenberg
At 10:10 AM 10/27/2010, Richard Quadling wrote: On 27 October 2010 14:11, Ethan Rosenberg eth...@earthlink.net wrote: Dear List - Thanks for all your excellent help. I am setting up a database for medical research, which will be conducted at various sites. Â The sites will be identified

Re: [PHP-DB] Parsing Tab Delimited file

2010-10-26 Thread Ethan Rosenberg
At 02:54 PM 10/24/2010, Jason Pruim wrote: On Oct 24, 2010, at 2:46 PM, Ethan Rosenberg wrote: Dear list - Thanks for all your help. I have a tab delimited file which I wish to import into a data base. In MySQL I can use the LOAD DATA command. As far as I know, that command cannot be used

Re: [PHP-DB] Parsing Tab Delimited file

2010-10-26 Thread Ethan Rosenberg
At 02:56 PM 10/24/2010, Andrés G. Montañez wrote: Hi Ethan, fist you need to read the file, you could use the file() function which reads the file as an array, being each line an element; the you have to navigate the array and exploding the lines into an array: $data = file('myfile.txt');

Re: [PHP-DB] Parsing Tab Delimited file

2010-10-26 Thread Richard Quadling
On 26 October 2010 14:52, Ethan Rosenberg eth...@earthlink.net wrote: At 02:56 PM 10/24/2010, Andrés G. Montañez wrote: Hi Ethan, fist you need to read the file, you could use the file() function which reads the file as an array, being each line an element; the you have to navigate the

Re: [PHP-DB] Parsing Tab Delimited file

2010-10-24 Thread Jason Pruim
On Oct 24, 2010, at 2:46 PM, Ethan Rosenberg wrote: Dear list - Thanks for all your help. I have a tab delimited file which I wish to import into a data base. In MySQL I can use the LOAD DATA command. As far as I know, that command cannot be used in PHP as a mysqli_query. As I

Re: [PHP-DB] Parsing Tab Delimited file

2010-10-24 Thread Andrés G . Montañez
Hi Ethan, fist you need to read the file, you could use the file() function which reads the file as an array, being each line an element; the you have to navigate the array and exploding the lines into an array: $data = file('myfile.txt'); foreach ($data AS $row) { $row = explode(\n,

Re: [PHP-DB] Parsing Tab Delimited file

2010-10-24 Thread Niel Archer
Dear list - Thanks for all your help. I have a tab delimited file which I wish to import into a data base. In MySQL I can use the LOAD DATA command. As far as I know, that command cannot be used in PHP as a mysqli_query. As I understand, I have to parse the file and use the INSERT

Re: [PHP-DB] Creating an INDEX on multiple tables?

2010-10-24 Thread Chris
On 22/10/10 21:00, Ron Piggott wrote: I have moved the GROUP BY outside now Chris. In the queries that make up the UNION ALL (such as below) is there a way to only SELECT matches that are 70% or greater based on the users input? Right now each and every listing is a search result.

Re: [PHP-DB] How to Sync MySQL with iPhone or Google Contacts

2010-10-23 Thread Andrés G . Montañez
Hi Ron, what's what you want to sync? Contacts? Or everything else? You want to sync it over the internet? Or over wire? You should research the iPhone API/SDK for sync; and not focus with MySQL, wich is just an storage. Cheers. On 23 October 2010 03:09, Karl DeSaulniers k...@designdrumm.com

Re: [PHP-DB] How to Sync MySQL with iPhone or Google Contacts

2010-10-23 Thread listread
Karl / Andrés Thanks for your replies. iMy appears to be only a client and I can already access servers with php on the iPhone web browser. I would like MySQL on my iPhone. There was a way to make a jailbroke iPhone a MySQL server, but I'm not sure it is available any longer. My

Re: [PHP-DB] How to Sync MySQL with iPhone or Google Contacts

2010-10-23 Thread Andrés G . Montañez
Hi Ron, watchout with the jailbrake becaous it will void your warranty over the iphone. If you want to sync the phone's contact with something, you really should check the iphone API and build an iphone application which hooks and listens for contact's change and then notify the changes to your

Re: [PHP-DB] How to Sync MySQL with iPhone or Google Contacts

2010-10-23 Thread listread
Andrés, It would be tempting to build an app for this, but we don't have a single Mac in the place. Maybe syncing with Google is the way to go? That would keep the iPhone out of the equation. (This is not intended for the market.) Thanks, - Ron On 10/23/2010 2:16 PM, Andrés G. Montañez

Re: [PHP-DB] How to Sync MySQL with iPhone or Google Contacts

2010-10-23 Thread Andrés G . Montañez
Hi Ron, yes,you should try to use Google as a gateway; the Google API is very well documented, I think all you need is just the user account (and password) and then through the API you should access all data. Cheers. On 23 October 2010 19:10, listread listr...@cze.com wrote: Andrés, It would

Re: [PHP-DB] How to Sync MySQL with iPhone or Google Contacts

2010-10-23 Thread Karl DeSaulniers
Hi Ron, I personally don't believe in syncing peoples personal contacts to anyones server. Especially google. If that is what that API does. But your call. You should be able to connect to the contact sync right on the phone with your app and not need a server to do this. On the

Re: [PHP-DB] Creating an INDEX on multiple tables?

2010-10-22 Thread Ron Piggott
I have moved the GROUP BY outside now Chris. In the queries that make up the UNION ALL (such as below) is there a way to only SELECT matches that are 70% or greater based on the users input? Right now each and every listing is a search result. Ron === SELECT

Re: [PHP-DB] big table / hadoop / map reduce

2010-10-22 Thread Andrés G . Montañez
Hi Artur, Here is an article on wikipedia: http://en.wikipedia.org/wiki/MapReduce And here are the native implementations in php: http://www.php.net/manual/en/function.array-map.php http://www.php.net/manual/en/function.array-reduce.php The basic idea is to gather a lot of data, from several

Re: [PHP-DB] big table / hadoop / map reduce

2010-10-22 Thread Artur Ejsmont
hehe sorry but this does not help :-) i can google for wikipedia definitions. I was hoping for some really good articles/examples that would put it into enough context. I would like to have good idea when it could be useful. So far had no luck with that. Its like with design patterns ...

Re: [PHP-DB] big table / hadoop / map reduce

2010-10-22 Thread Andrés G . Montañez
Imagine you have to get track of some kind of traffic, for example, ad impressions; lets supose that you have millions of those hits; you will have to have a few servers to receive the notifications of the impression of an ad. After the end of the day, you will have that info across a bunch of

Re: [PHP-DB] How to Sync MySQL with iPhone or Google Contacts

2010-10-22 Thread Karl DeSaulniers
I believe there is a MySQL for the iphone iMy? http://forums.mysql.com/read.php?58,249718,249718 You'd probably want o use JASON or an equiv. to talk back and forth with your database and app. At least thats the consensus I'm finding on posts about it. HTH Karl On Oct 22, 2010, at 11:21

Re: [PHP-DB] Creating an INDEX on multiple tables?

2010-10-21 Thread Artur Ejsmont
I dont think you can create such index across tables. If you are interested read up on sphinx. Im pretty sure you would be able to create what you need. Alternatively ... a super simplistic solution . create one extra search table with copy of the data and create index there? ;P hehehe +

Re: [PHP-DB] Creating an INDEX on multiple tables?

2010-10-21 Thread Bastien
Alternatively, you could try setting that index on each table and use a UNION to join multiple queries together provided each query returns the identical data set structures ( or the column types have to match) Bastien Koert 905-904-0334 Sent from my iPhone On 2010-10-21, at 7:06 AM, Artur

Re: [PHP-DB] Creating an INDEX on multiple tables?

2010-10-21 Thread Karl DeSaulniers
Excuse me for intruding, but wouldn't this be a Foreign Key solution? If one field is the same on all tables, can't you just set a Foreign Key that all tables with that field get their data from? Then you only have to query the master table?? Or an I not grasping the idea behind Foreign Keys. I

Re: [PHP-DB] Creating an INDEX on multiple tables?

2010-10-21 Thread Bastien
FKs are constraints. They really are there to ensure that the data in the FK exists in the other table. They do not operate like a conventional index that is there to aid in selecting data. Bastien Koert 905-904-0334 Sent from my iPhone On 2010-10-21, at 7:24 AM, Karl DeSaulniers

Re: [PHP-DB] Creating an INDEX on multiple tables?

2010-10-21 Thread Karl DeSaulniers
I see. Thanks for the explanation Bastien. Best, Karl On Oct 21, 2010, at 6:56 AM, Bastien wrote: FKs are constraints. They really are there to ensure that the data in the FK exists in the other table. They do not operate like a conventional index that is there to aid in selecting data.

Re: [PHP-DB] Creating an INDEX on multiple tables?

2010-10-21 Thread Logan Bailey
Sphinx can work and is fairly easy to install. If you don't want that create a summary temp. a table has a foreign key to the result row and columns for your search terms. On Thu, Oct 21, 2010 at 5:00 AM, Karl DeSaulniers k...@designdrumm.comwrote: I see. Thanks for the explanation Bastien.

Re: [PHP-DB] Creating an INDEX on multiple tables?

2010-10-21 Thread Ron Piggott
Piggott ron.pigg...@actsministries.org; php-db@lists.php.net Subject: Re: [PHP-DB] Creating an INDEX on multiple tables? Alternatively, you could try setting that index on each table and use a UNION to join multiple queries together provided each query returns the identical data set structures

Re: [PHP-DB] Creating an INDEX on multiple tables?

2010-10-21 Thread Ron Piggott
I am still struggling with this query still although I have made great progress. The following query (below) executes successfully. Right now the query returns no rows. I believe this is because there isn't automatically a record in the following three tables. `ministry_profiles_activity`

Re: [PHP-DB] Creating an INDEX on multiple tables?

2010-10-21 Thread Bastien
On 2010-10-21, at 7:38 PM, Ron Piggott ron.pigg...@actsministries.org wrote: I am still struggling with this query still although I have made great progress. The following query (below) executes successfully. Right now the query returns no rows. I believe this is because there isn't

Re: [PHP-DB] Creating an INDEX on multiple tables?

2010-10-21 Thread Ron Piggott
...@actsministries.org Cc: Artur Ejsmont ejsmont.ar...@gmail.com; php-db@lists.php.net Subject: Re: [PHP-DB] Creating an INDEX on multiple tables? On 2010-10-21, at 7:38 PM, Ron Piggott ron.pigg...@actsministries.org wrote: I am still struggling with this query still although I have made great progress

Re: [PHP-DB] Creating an INDEX on multiple tables?

2010-10-21 Thread Ron Piggott
Bastien (and others) I am still having one problem with this query I don't know how to resolve: When I add the category column: `ministry_categories`.`category` as part of the MATCH () I receive the error: Incorrect arguments to MATCH I create the LEFT OUTER JOINs to allow additional columns

Re: [PHP-DB] Creating an INDEX on multiple tables?

2010-10-21 Thread Chris
On 22/10/10 13:31, Ron Piggott wrote: Bastien (and others) I am still having one problem with this query I don't know how to resolve: When I add the category column: `ministry_categories`.`category` as part of the MATCH () I receive the error: Incorrect arguments to MATCH I create the LEFT

Re: [PHP-DB] Creating an INDEX on multiple tables?

2010-10-21 Thread Ron Piggott
The query works using UNION ALL and MATCH ( ) AGAINST --- one table at a time for the MATCH. The down side is that each SELECT is giving it's own search results. The directory listings are being displayed multiple times when one of the SELECTS produces it as a result. How do I limit the

Re: [PHP-DB] Creating an INDEX on multiple tables?

2010-10-21 Thread Chris
On 22/10/10 15:24, Ron Piggott wrote: The query works using UNION ALL and MATCH ( ) AGAINST --- one table at a time for the MATCH. The down side is that each SELECT is giving it's own search results. The directory listings are being displayed multiple times when one of the SELECTS produces it as

Re: [PHP-DB] Books

2010-10-19 Thread Richard Quadling
On 18 October 2010 15:06, Ethan Rosenberg eth...@earthlink.net wrote: Dear List - I posted part of this question on the general list.  I am posting here just in case this list did not see the post.  This should NOT be taken as any type of negative reference to the general list, the members of

Re: [PHP-DB] Database and Table creation

2010-10-19 Thread kesavan trichy rengarajan
Hi Ethan, Database Creation: http://www.php.net/manual/en/function.mysql-create-db.php http://www.php.net/manual/en/function.mysql-create-db.phpAdding Tables, Extract Data: http://www.freewebmasterhelp.com/tutorials/phpmysql/1 http://www.freewebmasterhelp.com/tutorials/phpmysql/1Explore the

[PHP-DB] RE: php-db Digest 19 Oct 2010 22:24:15 -0000 Issue 4629

2010-10-19 Thread Jimmy Sole
Hello everyone, I'm having trouble executing a insert select query in PHP Here is the code: $exec = self::init()-prepare(INSERT INTO owners (f_name, l_name, username, password, email, company, str_address, city, state, zip, phone,

Re: [PHP-DB] RE: php-db Digest 19 Oct 2010 22:24:15 -0000 Issue 4629

2010-10-19 Thread Chris
On 20/10/10 09:55, Jimmy Sole wrote: Hello everyone, I'm having trouble executing a insert select query in PHP Here is the code: $exec = self::init()-prepare(INSERT INTO owners (f_name, l_name, username, password, email, company, str_address,

Re: [PHP-DB] Books

2010-10-18 Thread Artur Ejsmont
the only book i can really recommend in this area is high performance mysql but its not for starters ..its excellent! art On 18 October 2010 15:06, Ethan Rosenberg eth...@earthlink.net wrote: Dear List - I posted part of this question on the general list.  I am posting here just in case

Re: [PHP-DB] Books

2010-10-18 Thread mrfroasty
1.PHP Objects,Patterns, and Practice 2.Pro PHP Patterns, Frameworks,Testing and More MySQL: 1.MySQL Cookbook html/css no idea, I dont have good ideas of designing even if I become fluent in css.But its handy to know css just how it generally works and its place on the webAnyways, dont

Re: [PHP-DB] Escaping an '

2010-10-17 Thread Bastien
Mysql_real_escape_string($bar) Bastien Koert 905-904-0334 Sent from my iPhone On 2010-10-16, at 10:41 PM, Ron Piggott ron.pigg...@actsministries.org wrote: For a query similar to: SELECT * FROM `tablle` WHERE `column` LIKE 'Sally's Hair Parlor' how do I escape the ' for 's? -- PHP

Re: [PHP-DB] Query for duplicate records

2010-10-17 Thread Chris
On 18/10/10 06:55, Ron Piggott wrote: Is there a query you could help me write a SELECT query that would search table `ministry_profiles` for where column `organization` has the same organization more than once? I am trying to delete the duplicate organization records, but I am working with

Re: [PHP-DB] Re: SOUNDS_LIKE, SOUNDEX

2010-10-11 Thread Chris
On 12/10/10 08:45, Ron Piggott wrote: After looking at the response I tried to make 2 mySQL queries that I need help with. (I didn't use the PHP functions because I am trying to query the database for results: #1: SELECT `word` FROM `bible_concordance_words` WHERE SOUNDEX('command') ORDER BY

Re: [PHP-DB] products order

2010-09-29 Thread Peter Lind
On 29 September 2010 14:00, Emiliano Boragina emiliano.borag...@gmail.com wrote: Hello, A client wants to control the order, the position of the products he load. How do I do this? You store positional data per product, defaulting to no priority in position. Regards Peter -- hype WWW:

Re: [PHP-DB] session expiration

2010-09-28 Thread Richard Quadling
On 28 September 2010 03:06, Ron nha...@gmail.com wrote: Hi, i would like to ask how to set the session expiration. on my site when a user logs in, i assign it to $_SESSION['username'] and on each page i check if (isset($_SESSION['username']) if not i redirect it back to login page. my

Re: [PHP-DB] formatting a word doc using php ?

2010-09-20 Thread Richard Quadling
On 17 September 2010 21:41, Vinay Kannan viny...@gmail.com wrote: Hello Xperts, I am trying out a couple of things and have come across this requirement, where in a php script should create a doc file with specific formatting, I can create the file, havent tried it yet, but shouldnt be a

RE: [PHP-DB] formatting a word doc using php ?

2010-09-17 Thread Ashay Chaudhary
http://phpword.codeplex.com/ I haven't used it myself, but it is open source (LGPL) so you can check out the code and tweak it as necessary. It's based on the PHPExcel work done by Maarten, who's an incredibly smart guy. : Ashay -Original Message- From: Vinay Kannan

Re: [PHP-DB] formatting a word doc using php ?

2010-09-17 Thread Aleksei Sapunov
Guys, is it a joke? May be you need to choose right list carefully? 2010/9/18 Ashay Chaudhary ash...@microsoft.com http://phpword.codeplex.com/ I haven't used it myself, but it is open source (LGPL) so you can check out the code and tweak it as necessary. It's based on the PHPExcel work done

Re: [PHP-DB] SELECT / ORDER BY

2010-09-13 Thread Richard Quadling
On 11 September 2010 07:47, Ron Piggott ron.pigg...@actsministries.org wrote: I wrote the query below to determine the 10 most popular words used: SELECT COUNT( `bible_concordance_usage`.`reference` ) AS word_usage, `bible_concordance_words`.`reference` , `bible_concordance_words`.`word`

Re: [PHP-DB] SELECT / ORDER BY

2010-09-11 Thread Karl DeSaulniers
Hello, This may help. http://dev.mysql.com/doc/refman/5.0/en/order-by-optimization.html Best, Karl On Sep 11, 2010, at 1:47 AM, Ron Piggott wrote: I wrote the query below to determine the 10 most popular words used: SELECT COUNT( `bible_concordance_usage`.`reference` ) AS word_usage,

Re: [PHP-DB] auto_increment

2010-09-08 Thread Adriano Rodrigo Guerreiro Laranjeira
Hello! I didn't use any DROP statements. Do exactly as following: mysql CREATE TABLE stats2 LIKE stats; mysql ALTER TABLE stats2 ADD COLUMN id INT NOT NULL AUTO_INCREMENT, ADD PRIMARY KEY(id); mysql INSERT INTO stats2 SELECT *, 0 FROM stats ORDER BY The first line copies the structure of

Re: [PHP-DB] auto_increment

2010-09-07 Thread Adriano Rodrigo Guerreiro Laranjeira
Hey friend! I can't see another way to fix your table without a processing (like a stored procedure, script, etcetera). But I believe there is a workaround, which involves a creation of another table. See this: mysql CREATE TABLE stats2 LIKE stats; mysql ALTER TABLE stats2 ADD COLUMN id INT

Re: [PHP-DB] auto_increment

2010-09-07 Thread Ron Piggott
I am receiving the following error Adriano: SQL query: ALTER TABLE `stats` DROP `visits` CREATE TABLE `stats2` LIKE `stats` ; MySQL said: Documentation #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near

Re: [PHP-DB] auto_increment

2010-09-07 Thread Kapu
You are missing a semicolon after the first alter statement. Kapu On 7. 9. 2010 18:05, Ron Piggott wrote: I am receiving the following error Adriano: SQL query: ALTER TABLE `stats` DROP `visits` CREATE TABLE `stats2` LIKE `stats` ; MySQL said: Documentation #1064 - You have an error in

Re: [PHP-DB] Is this syntax is correct?

2010-09-06 Thread Amit Tandon
SELECT d.username, r.password FROM data join registration r on r.username = d.username WHERE r.username like '%s' AND r.password like '%s' Presuming the password stored as clear text and username is common field SELECT d.username, r.password FROM data join registration r on r.username =

Re: [PHP-DB] Is this syntax is correct?

2010-09-06 Thread Ken Kixmoeller
Amit Tandon wrote: SELECT d.username, r.password FROM data join registration r on r.username SELECT username FROM data, password FROM registration WHERE username=%s AND password=%s Oh, boy -- r on r?? Obviously the guy is a rookie. Let's be simple: SELECT

Re: [PHP-DB] Is this syntax is correct?

2010-09-06 Thread Richard Quadling
On 6 September 2010 16:11, Ken Kixmoeller kixjag...@comcast.net wrote: 2. As Amit kind of said, no password should be stored in a table (available on a web server) without encrypting the password information. I'd go further and say no password should be stored in a table. A hash of the salted

Re: [PHP-DB] Select the specific user data from the database

2010-09-05 Thread Phpster
Then each record needs to have a user filed where their is stored. Then your access query just adds an additional filter to check this value Select * from data_table where user = $user Bastien Sent from my iPod On Sep 5, 2010, at 7:21, nagendra prasad nagendra802...@gmail.com wrote: Hi

Re: [PHP-DB] Select the specific user data from the database

2010-09-05 Thread nagendra prasad
PS: Want to check the username from a table and the password from another table. Is it possible ??

Re: [PHP-DB] Select the specific user data from the database

2010-09-05 Thread Phpster
I would suggest that you keep authorization separate from data access Bastien Sent from my iPod On Sep 5, 2010, at 9:19, nagendra prasad nagendra802...@gmail.com wrote: PS: Want to check the username from a table and the password from another table. Is it possible ?? -- PHP Database

RE: [PHP-DB] AUTO_INCREMENT value

2010-09-05 Thread Ron Piggott
I figured it out, the permissions weren't set on the user to allow the command to work. Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Re: Need Help with database output

2010-08-30 Thread Bastien Koert
On Mon, Aug 30, 2010 at 12:14 PM, nagendra prasad nagendra802...@gmail.com wrote: Hi All, Thanks for all your replies. I have found what I needed. I used Dreamweaver to show the database in 3 different columns. However now I don't know how to add a search engine to it. Right now its showing

Re: [PHP-DB] Re: Need Help with database output

2010-08-30 Thread Vinay Kannan
Whats Dreamweaver php codes. It automatically does the coding ?? Never even knew about such a thing Thanks, Vinay On Mon, Aug 30, 2010 at 9:44 PM, nagendra prasad nagendra802...@gmail.comwrote: Hi All, Thanks for all your replies. I have found what I needed. I used Dreamweaver to show the

Re: [PHP-DB] Re: Need Help with database output

2010-08-30 Thread nagendra prasad
yep if you want to make a slight changes like some color or some space change you can always use the code tab in the Dreamweaver :). I fee very easy to change minor codes in the coding tab rather then using menus and stuff :)

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

2010-08-27 Thread Vinay Kannan
Thank you everyone window.onunload() function works perfect, thats what I was looking for !! Thanks, Vinay Kannan. On Thu, Aug 26, 2010 at 3:24 AM, kesavan trichy rengarajan k...@trk7.comwrote: Have a look at this: https://developer.mozilla.org/en/DOM/window.onunload

Re: [PHP-DB] Database management

2010-08-26 Thread Karl DeSaulniers
Thank you all for your comments and suggestions. It was a real task to find something open source, so I gave up on that. I decided to go with RazorSQL. Its just what I needed and I already have most of the changes done on the database already. and I am only using the trial version ATM. I

Re: [PHP-DB] Database management

2010-08-26 Thread Karl DeSaulniers
: [PHP-DB] Database management Thank you all for your comments and suggestions. It was a real task to find something open source, so I gave up on that. I decided to go with RazorSQL. Its just what I needed and I already have most of the changes done on the database already. and I am only using

Re: [PHP-DB] Database management

2010-08-26 Thread Karl DeSaulniers
...@designdrumm.com] Sent: Thursday, August 26, 2010 12:03 PM To: php-db@lists.php.net Subject: Re: [PHP-DB] Database management That is interesting cause they are an asp based server. I'll have to take a look at that. Might be something I can build into the server. Is it web based like phpMyAdmin? Best

RE: [PHP-DB] Database management

2010-08-26 Thread Ashay Chaudhary
It appears to be. I've downloaded the free/trial version, I haven't had time to play with it. : Ashay -Original Message- From: Karl DeSaulniers [mailto:k...@designdrumm.com] Sent: Thursday, August 26, 2010 12:03 PM To: php-db@lists.php.net Subject: Re: [PHP-DB] Database management

RE: [PHP-DB] Database management

2010-08-26 Thread Ashay Chaudhary
26, 2010 9:06 AM To: php-db@lists.php.net Subject: Re: [PHP-DB] Database management Thank you all for your comments and suggestions. It was a real task to find something open source, so I gave up on that. I decided to go with RazorSQL. Its just what I needed and I already have most of the changes

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 the

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

2010-08-25 Thread Karl DeSaulniers
I think you can do that with window.focus in javascript. Karl On Aug 25, 2010, at 3:32 PM, Vinay Kannan wrote: Hello Guys, 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 )

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

2010-08-25 Thread kesavan trichy rengarajan
Have a look at this: https://developer.mozilla.org/en/DOM/window.onunload https://developer.mozilla.org/en/DOM/window.onunloadBut, as someone pointed out a few days ago, please do not post stuff that is not related to PHP DB. On Thu, Aug 26, 2010 at 6:32 AM, Vinay Kannan viny...@gmail.com wrote:

Re: [PHP-DB] Database management

2010-08-25 Thread Phpster
On Aug 25, 2010, at 19:27, Karl DeSaulniers k...@designdrumm.com wrote: Hello fellow PHPers, Question, 1. Does anyone know of a good Open source MS SQLServer management software for MAC? I have been charged with updating a companies Microsoft SQLServer and I usually work in MySQL. Need

Re: [PHP-DB] Slashes or no slashes

2010-08-24 Thread Chris
In the case that your comparing a field to a field in the database (the field name) do you escape that or because it is hardcoded you dont need to? My thoughts are that you need to escape all data going in. Correct. A field name is not data though. You've already validated it (somehow, either

Re: [PHP-DB] Slashes or no slashes

2010-08-23 Thread Karl DeSaulniers
On Aug 22, 2010, at 7:12 PM, Chris wrote: On 20/08/10 08:05, Karl DeSaulniers wrote: On Aug 19, 2010, at 4:44 PM, Karl DeSaulniers wrote: On Aug 19, 2010, at 4:36 PM, Daevid Vincent wrote: You should be using http://us2.php.net/manual/en/function.mysql-escape-string.php You don't need

Re: [PHP-DB] Slashes or no slashes

2010-08-23 Thread Chris
You use mysql_real_escape_string for queries on the way in. $query = select * from table where name='.mysql_real_escape_string($_POST['name']).'; You use htmlspecialchars on the way out: $value = htmlspecialchars($row['name']); -- Postgresql php tutorials http://www.designmagick.com/ --

Re: [PHP-DB] Slashes or no slashes

2010-08-23 Thread Karl DeSaulniers
On Aug 23, 2010, at 8:35 PM, Chris wrote: You use mysql_real_escape_string for queries on the way in. $query = select * from table where name='.mysql_real_escape_string($_POST['name']).'; You use htmlspecialchars on the way out: $value = htmlspecialchars($row['name']); -- Postgresql

Re: [PHP-DB] Slashes or no slashes

2010-08-23 Thread Chris
To be more specific. Is this correct? function confirmUP($username, $password){ $username = mysql_real_escape_string($username); /* Verify that user is in database */ $q = SELECT password FROM TBL-U WHERE username = '$username'; I normally do it in the query in case you use the variable

Re: [PHP-DB] Slashes or no slashes

2010-08-23 Thread Karl DeSaulniers
On Aug 23, 2010, at 9:31 PM, Chris wrote: To be more specific. Is this correct? function confirmUP($username, $password){ $username = mysql_real_escape_string($username); /* Verify that user is in database */ $q = SELECT password FROM TBL-U WHERE username = '$username'; I normally do it

Re: [PHP-DB] Slashes or no slashes

2010-08-23 Thread Karl DeSaulniers
On Aug 23, 2010, at 10:04 PM, Karl DeSaulniers wrote: On Aug 23, 2010, at 9:31 PM, Chris wrote: To be more specific. Is this correct? function confirmUP($username, $password){ $username = mysql_real_escape_string($username); /* Verify that user is in database */ $q = SELECT password FROM

Re: [PHP-DB] Slashes or no slashes

2010-08-23 Thread Chris
Just to make sure, cause I am ready to get past this. Is this correct? function confirmUP($username, $password){ /* Verify that user is in database */ $q = SELECT password FROM .TBL_USERS. WHERE username = '.mysql_real_escape_string($username).'; Perfect. /* Retrieve password from result

Re: [PHP-DB] Slashes or no slashes

2010-08-23 Thread Karl DeSaulniers
On Aug 23, 2010, at 10:35 PM, Chris wrote: Just to make sure, cause I am ready to get past this. Is this correct? function confirmUP($username, $password){ /* Verify that user is in database */ $q = SELECT password FROM .TBL_USERS. WHERE username = '.mysql_real_escape_string($username).';

Re: [PHP-DB] Slashes or no slashes

2010-08-23 Thread Chris
Got it. So only when I am going to diplay the result from the database. I see. Or email (or otherwise present it to the user), yes. But for comparing $dbarray['password'] to $password, don't I have to escape $password and then md5 it? Right. -- Postgresql php tutorials

Re: [PHP-DB] Slashes or no slashes

2010-08-23 Thread Karl DeSaulniers
On Aug 23, 2010, at 11:38 PM, Karl DeSaulniers wrote: On Aug 23, 2010, at 10:35 PM, Chris wrote: Just to make sure, cause I am ready to get past this. Is this correct? function confirmUP($username, $password){ /* Verify that user is in database */ $q = SELECT password FROM .TBL_USERS.

Re: [PHP-DB] Slashes or no slashes

2010-08-22 Thread Chris
On 20/08/10 08:05, Karl DeSaulniers wrote: On Aug 19, 2010, at 4:44 PM, Karl DeSaulniers wrote: On Aug 19, 2010, at 4:36 PM, Daevid Vincent wrote: 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.

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] Slashes or no slashes

2010-08-19 Thread Karl DeSaulniers
On Aug 19, 2010, at 4:36 PM, Daevid Vincent wrote: 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,

Re: [PHP-DB] Slashes or no slashes

2010-08-19 Thread Karl DeSaulniers
On Aug 19, 2010, at 4:36 PM, Daevid Vincent wrote: 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,

Re: [PHP-DB] Slashes or no slashes

2010-08-19 Thread Karl DeSaulniers
On Aug 19, 2010, at 4:44 PM, Karl DeSaulniers wrote: On Aug 19, 2010, at 4:36 PM, Daevid Vincent wrote: 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

Re: [PHP-DB] Slashes or no slashes

2010-08-19 Thread kapuoriginal
I think you should use prepared statements. Kapu -- From: Karl DeSaulniers k...@designdrumm.com Sent: Friday, August 20, 2010 12:05 AM To: php-db@lists.php.net Subject: Re: [PHP-DB] Slashes or no slashes On Aug 19, 2010, at 4:44 PM, Karl

Re: [PHP-DB] Slashes or no slashes

2010-08-19 Thread Karl DeSaulniers
: Friday, August 20, 2010 12:05 AM To: php-db@lists.php.net Subject: Re: [PHP-DB] Slashes or no slashes On Aug 19, 2010, at 4:44 PM, Karl DeSaulniers wrote: On Aug 19, 2010, at 4:36 PM, Daevid Vincent wrote: You should be using http://us2.php.net/manual/en/function.mysql-escape-string.php You don't

Re: [PHP-DB] CURDATE

2010-08-16 Thread kesavan trichy rengarajan
Try: DATE(date_accessed) = CURDATE(). Have a look at this: http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_dateto understand what's happening. Regards, Kesavan. On 17/08/2010 6:26 AM, Ron Piggott ron.pigg...@actsministries.org wrote: I am wondering why: SELECT *

Re: [PHP-DB] CURDATE

2010-08-16 Thread Aleksei Sapunov
Hi all, I have a big question - why on this list raised question about MySQL or any other database without any relation to PHP? Is it list for solving SQL and DB problems? When I subscribe to this list I think that this list is about PHP DB problems. At least problems related to PHP - but not

Re: [PHP-DB] how to explain such a regular syntax

2010-08-13 Thread Peter Lind
On 13 August 2010 08:47, win.a win@gmail.com wrote: Its was picked from drupal source code and i don't know how does it works. This is the code : preg_match('/^\[?(?:[a-z0-9-:\]_]+\.?)+$/', $host); This has got nothing to do with php or php-db - your question is on regular expressions. Try

Re: [PHP-DB] COUNT() query help

2010-08-13 Thread Richard Quadling
On 13 August 2010 13:43, Ron Piggott ron.pigg...@actsministries.org wrote: SELECT `bible_concordance_words`.`reference`, `bible_concordance_words`.`word`, COUNT(`bible_concordance_word_reference`.`bible_concordance_words_reference`) AS occurrences FROM `bible_concordance_words` INNER JOIN

Re: [PHP-DB] SELECT with ' in search term

2010-08-12 Thread Chris
On 13/08/10 13:26, Ron Piggott wrote: If the variable $segment has an ' in it the $query won't work because of having 3 ' 's. Should I be using: $segment = mysql_real_escape_string($segment); before querying the database? Use it in your query. Don't use it anywhere else. Your code may use

Re: [PHP-DB] Unable to connect to mysql database

2010-08-11 Thread Vinay Kannan
I am guessing the message unable to connect to database is something you have echoed on a die() or as an error message, could you tell us what is the step before this. Also just check if the database is set correctly, and the user name and the password is correct. Some hosts use the host as

RE: [PHP-DB] Unable to connect to mysql database

2010-08-10 Thread 3dgtech
Hi there, You will have to adjust the configuration file (configuration.php) in your root folder for the new site. var $host = ; var $user = ; var $db = ; they have to reflect the new settings. Hope that helps. Eli Aschkenasy -Original Message- From:

<    7   8   9   10   11   12   13   14   15   16   >