Re: [PHP-DB] Re: delete message function

2011-06-14 Thread Simcha Younger
On Tue, 14 Jun 2011 00:50:39 -0500 Chris Stinemetz chrisstinem...@gmail.com wrote: On Tue, Jun 14, 2011 at 12:31 AM, Chris Stinemetz chrisstinem...@gmail.com wrote: I created the below delete function, but it doesn't seem to be working correctly. When I enter the correct password it get my

Re: [PHP-DB] problem in connecting to mysql from php

2011-06-13 Thread C0mf0rtably Numb
Okay. I tried using that too. If I run this: ?php $link = mysql_connect('localhost', 'root', 'Password123'); if (!$link) { die('Could not connect: ' . mysql_error()); } echo 'Connected successfully'; mysql_close($link); ? I get the error: *Fatal error*: Call to undefined function

Re: [PHP-DB] problem in connecting to mysql from php

2011-06-13 Thread Richard Quadling
On 13 June 2011 13:26, C0mf0rtably Numb 08.kus...@gmail.com wrote: Okay. I tried using that too. If I run this: ?php $link = mysql_connect('localhost', 'root', 'Password123'); if (!$link) {    die('Could not connect: ' . mysql_error()); } echo 'Connected successfully';

Re: [PHP-DB] Re: problem in connecting to mysql from php

2011-06-13 Thread Richard Quadling
On 13 June 2011 14:12, C0mf0rtably Numb 08.kus...@gmail.com wrote: Any help? On Mon, Jun 13, 2011 at 5:38 PM, C0mf0rtably Numb 08.kus...@gmail.comwrote: Hello everyone, I am in the process of learning php and I was trying to connect to a mysql database on my own computer(localhost). I have

Re: [PHP-DB] Re: problem in connecting to mysql from php

2011-06-13 Thread Richard Quadling
On 13 June 2011 15:28, C0mf0rtably Numb 08.kus...@gmail.com wrote: My php and apache are working fine together. I was doing good with php and apache until I decided to work with mysql. I will have a look at all the links you provided and see if gives me a solution. Thanks. On Mon, Jun 13,

Re: [PHP-DB] mysql_query

2011-06-06 Thread Niel Archer
Hello all, Not sure what I am doing wrong. I have a simple form that populate the variables in a mysql query. I know the selected values are making it to the form porcessing script because I can echo them on the processing script as indicated below. You Selected Cell_Sect = 1_1 You

Re: [PHP-DB] mysqldump permissions

2011-06-05 Thread kesavan trichy rengarajan
Give the user show view permission http://dev.mysql.com/doc/refman/5.1/en/privileges-provided.html#priv_show-view On 06/06/2011 7:57 AM, Ron Piggott ron.pigg...@actsministries.org wrote: I created a VIEW “table” yesterday. Last night when the cron job ran to back up the database I received this

Re: [PHP-DB] Converting from PHP4 to php5

2011-06-03 Thread Richard Quadling
On 1 June 2011 13:52, Dr Vijay Kumar vaibhavinformat...@gmail.com wrote: i AM WONDERING IF SOMEONE CAN TAKE UP CONVERSION OF MY SOFTWARE FROM PHP4 TO PHP5 Whilst there will be many aspects of the code that will run quite happily, there are several features that have been deprecated and/or

Re: [PHP-DB] Converting from PHP4 to php5

2011-06-03 Thread user080701
-- From: Richard Quadling rquadl...@gmail.com Sent: Friday, June 03, 2011 7:26 PM To: Dr Vijay Kumar vaibhavinformat...@gmail.com Cc: php-db@lists.php.net Subject: Re: [PHP-DB] Converting from PHP4 to php5 On 1 June 2011 13:52, Dr Vijay Kumar

Re: [PHP-DB] Converting from PHP4 to php5

2011-06-03 Thread user080701
-- From: Richard Quadling rquadl...@gmail.com Sent: Friday, June 03, 2011 7:26 PM To: Dr Vijay Kumar vaibhavinformat...@gmail.com Cc: php-db@lists.php.net Subject: Re: [PHP-DB] Converting from PHP4 to php5 On 1 June 2011 13:52, Dr Vijay Kumar

Re: [PHP-DB] Converting from PHP4 to php5

2011-06-03 Thread Karl DeSaulniers
Google php4 to php5 converter or php4 to php5 conversion That should set you on your way. The best way I have read to do this is just run your code on a php5 server and build in php error detection of some kind, then just fix the errors as they come. :) Best, Karl On Jun 3, 2011, at 6:26

Re: [PHP-DB] Converting from PHP4 to php5

2011-06-02 Thread Richard Quadling
On 1 June 2011 14:26, HallMarc Websites m...@hallmarcwebsites.com wrote: Without looking at the rules (Sry barely have time to reply!) I don't think this is appropriate for this list. I am fairly certain it is against the rules to ask/offer work on here. Can anyone confirm or deny? Thank

Re: [PHP-DB] Converting from PHP4 to php5

2011-06-02 Thread Guru™
Richard I are waiting for an answer from someone..??? -- *Best, * *Guru™*

Re: [PHP-DB] Converting from PHP4 to php5

2011-06-01 Thread Guru™
I am not a master but as per my knowledge your software which is in PHP4 should work properly in PHP5 too. -- *Best, * *Guru™*

RE: [PHP-DB] Converting from PHP4 to php5

2011-06-01 Thread HallMarc Websites
i AM WONDERING IF SOMEONE CAN TAKE UP CONVERSION OF MY SOFTWARE FROM PHP4 TO PHP5 Without looking at the rules (Sry barely have time to reply!) I don't think this is appropriate for this list. I am fairly certain it is against the rules to ask/offer work on here. Can anyone confirm or deny?

Re: [PHP-DB] php_interbase.dll , PHP 5.3.x VC9 needed, which works with Embarcadero Interbase

2011-05-31 Thread Lester Caine
Shahriyar Imanov wrote: Hey guys, I wonder if anyone can help me to find php_interbase.dll file for PHP 5.3.x [VC9], which works with Embarcadero Interbase. I tried those which come with PHP distribution: apparently they all work with Firebird only. When I tried them, they say I don't have

Re: [PHP-DB] mysql_num_rows == 0

2011-05-30 Thread Peter Lind
On 30 May 2011 22:31, Nazish naz...@jhu.edu wrote: Hi all, I've run into a little barrier, and I'm wondering whether you have any insights. I'm entering values into a MySQL database. Before running the mysql_query, I'm checking if the value already exists (using mysql_num_rows == 0).  If the

Re: [PHP-DB] mysql_num_rows == 0

2011-05-30 Thread Karl DeSaulniers
try this instead.. if(mysql_num_rows($check) 0) { //true } else { //false } and yes, Peter's right... please dont make everything die(). Karl On May 30, 2011, at 3:43 PM, Peter Lind wrote: On 30 May 2011 22:31, Nazish naz...@jhu.edu wrote: Hi all, I've run into a little

Re: [PHP-DB] mysql_num_rows == 0

2011-05-30 Thread Nazish
That did the trick: I was over-enthusiastic in my usage of die(mysql_error). I initially used mysql_error to troubleshoot another problem (which has now re-emerged), but that's a different question which is puzzling me. The error message ($alert = Username already exists!;) displays on the page

Re: [PHP-DB] mysql_num_rows == 0

2011-05-30 Thread Nazish
Code runs smoothly now, thanks. It's always great to pick up diverse coding tips through the conversations here. 2011/5/30 Nazish naz...@jhu.edu That did the trick: I was over-enthusiastic in my usage of die(mysql_error). I initially used mysql_error to troubleshoot another problem (which

Re: [PHP-DB] extracting id from db from a form field

2011-05-27 Thread Karl DeSaulniers
Hi David, Try this.. if(!isset($_POST['ErrorCode'])) { die('You did not enter an error code!'); } else { $errorcode = $_POST['ErrorCode']; $sql = mysql_query(SELECT * FROM Sheet1 WHERE errorcode='. $errorcode.' ); if($sql mysql_numrows($sql) 0) { $row

Re: [PHP-DB] extracting id from db from a form field

2011-05-27 Thread Karl DeSaulniers
Oh I forgot.. ... WHERE errorcode='.mysql_real_escape_string($errorcode).'); Best, Karl On May 27, 2011, at 2:48 PM, Karl DeSaulniers wrote: Hi David, Try this.. if(!isset($_POST['ErrorCode'])) { die('You did not enter an error code!'); } else { $errorcode =

Re: [PHP-DB] extracting id from db from a form field

2011-05-27 Thread David McGlone
On Fri, 2011-05-27 at 14:48 -0500, Karl DeSaulniers wrote: Hi David, Try this.. if(!isset($_POST['ErrorCode'])) { die('You did not enter an error code!'); } else { $errorcode = $_POST['ErrorCode']; $sql = mysql_query(SELECT * FROM Sheet1 WHERE errorcode='. $errorcode.'

Re: [PHP-DB] extracting id from db from a form field

2011-05-27 Thread Karl DeSaulniers
Hi David, Yeah sorry, that was all of the top of the head, so I apologize if anything was incorrect. I am glad you got it working though.. Best, Karl On May 27, 2011, at 3:50 PM, David McGlone wrote: On Fri, 2011-05-27 at 14:48 -0500, Karl DeSaulniers wrote: Hi David, Try this..

Re: [PHP-DB] extracting id from db from a form field

2011-05-27 Thread Karl DeSaulniers
To get row 0 make the for loop change to for($i=-1; Best, Karl On May 27, 2011, at 4:08 PM, Karl DeSaulniers wrote: Hi David, Yeah sorry, that was all of the top of the head, so I apologize if anything was incorrect. I am glad you got it working though.. Best, Karl On May 27, 2011, at

Re: [PHP-DB] extracting id from db from a form field

2011-05-27 Thread Karl DeSaulniers
Actually you can keep $i as zero, it should still get row 0 now that I think of it. dont know how your table is set up so hard to tell. On May 27, 2011, at 4:31 PM, David McGlone wrote: On Fri, 2011-05-27 at 16:13 -0500, Karl DeSaulniers wrote: To get row 0 make the for loop change to

Re: [PHP-DB] extracting id from db from a form field

2011-05-27 Thread Karl DeSaulniers
Good 2 hear. Pay it forward.. :) On May 27, 2011, at 4:50 PM, David McGlone wrote: On Fri, 2011-05-27 at 16:13 -0500, Karl DeSaulniers wrote: To get row 0 make the for loop change to for($i=-1; Karl, it's completely working now, I changed empty back to !isset and that did the trick. Got

Re: [PHP-DB] Query Question

2011-05-23 Thread maarten
I would keep the db names and/or schema names in your queries. It clarifies what you are doing with the query making it easier for someone else to debug, improve, ... Certainly for those not familiar with your db structure. I am not aware of any drawbacks that can result from this. (Ok, maybe

Re: [PHP-DB] Query Question

2011-05-23 Thread maarten
That's a very good point, but since I use postgres that's one point that doesn't affect me and as such didn't cross my mind at the time. (Postgres uses schemas where mysql uses databases, a different database on postgres usually means a different database machine. And joining tables from

Re: [PHP-DB] Prepared Statements Rows Selected

2011-05-23 Thread Giff Hammar
$stmt-rows() should give you the number of rows returned. Giff On Mon, 2011-05-23 at 18:53 -0400, Ron Piggott wrote: What command will tell me the # of rows the SELECT query retrieved using Prepared Statements. $dsh = 'mysql:host=localhost;dbname='.$database; $dbh = new PDO($dsh,

Re: [PHP-DB] COUNT and OUTER JOIN results

2011-05-06 Thread Amit Tandon
Dear Ron Take your condition to ON cluause. So your on clause (for LEFT JOIN) would read something like ON `prayer_request_category`.` reference` = `prayer_requests`.`prayer_request_category_reference` AND `prayer_requests`.`approval_ level` IN ( 1, 3 ) `prayer_requests`.`prayer_request_type` =

Re: [PHP-DB] COUNT and OUTER JOIN results

2011-05-06 Thread Ron Piggott
thank you for explaining this to me Amit. It works. Ron The Verse of the Day “Encouragement from God’s Word” http://www.TheVerseOfTheDay.info From: Amit Tandon Sent: Friday, May 06, 2011 5:49 AM To: Ron Piggott Cc: php-db@lists.php.net Subject: Re: [PHP-DB] COUNT and OUTER JOIN results

Re: [PHP-DB] PHP.ini file

2011-05-03 Thread David Robley
Gavin Chalkley wrote: Is there no way of setting unique .ini? As I am running multi Dev sites from Xampp, of which require different includes and other settings On 2 May 2011 18:31, Barry Stear bst...@gmail.com wrote: You just need to update the php.ini file that you have making any

Re: [PHP-DB] PHP.ini file

2011-05-02 Thread Gavin Chalkley
Is there no way of setting unique .ini? As I am running multi Dev sites from Xampp, of which require different includes and other settings On 2 May 2011 18:31, Barry Stear bst...@gmail.com wrote: You just need to update the php.ini file that you have making any changes necessary. I would

Re: [PHP-DB] PHP4 vs PHP5

2011-05-01 Thread Toby Hart Dyke
See: http://us2.php.net/manual/en/migration5.php That gives details of migration from PHP4 to PHP5. There are also guides for migration between each major point release: http://us2.php.net/manual/en/migration51.php http://us2.php.net/manual/en/migration52.php

Re: [PHP-DB] Pause While-loop when waiting for function call to complete

2011-04-24 Thread Richard Quadling
On 24 April 2011 05:19, listread listr...@cze.com wrote: While listing each row in a MySQL database, I need to call a function or another php file for each row. How can I make the while-loop wait for the called function to complete before continuing to the next row in the while-loop?

Re: [PHP-DB] Re: filter search

2011-04-20 Thread Ken Kixmoeller
On Tue, Apr 19, 2011 at 7:41 PM, Jim Giner jim.gi...@albanyhandball.com wrote:O No follow-up?  I must have made complete sense!!  :) Either that or (based on the initial post) he had *no* idea what you were talking about. Ken -- PHP Database Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP-DB] Re: filter search

2011-04-20 Thread Jim Giner
Methinks you are correct. MAYBE I should have written the code too! Ken Kixmoeller kixjag...@comcast.net wrote in message news:banlktinmme9ws1ztrepum+fnmmsywan...@mail.gmail.com... On Tue, Apr 19, 2011 at 7:41 PM, Jim Giner jim.gi...@albanyhandball.com wrote:O No follow-up? I must have made

Re: [PHP-DB] Re: filter search

2011-04-20 Thread Emiliano Boragina
Jim, thanks for your help... I send because the first emial was replied saying to send again to see if I am a spamer... Thanks again. 2011/4/20 Jim Giner jim.gi...@albanyhandball.com oh - and by the way - don't email people directly. We are all reading the list, so send your mail to the list

[PHP-DB] Re: RE:[PHP-DB] How do I do math with a UNION ALL

2011-04-16 Thread Ron Piggott
Thank you for the suggestion. This is the actual query that I implemented: Amazing how this works. Ron SELECT SUM( `impressions_total` ) AS impressions_total , SUM( `usage_total` ) AS usage_total FROM ( ( SELECT IF ( SUM(

Re: [PHP-DB] Re: automactic email notification

2011-04-13 Thread Chris Stinemetz
On Wed, Apr 13, 2011 at 11:08 AM, Jim Giner jim.gi...@albanyhandball.com wrote: Without looking at your HUGE code stream, I'm curious what your question really is.  If you know how to send an email, and you know how to update your table, then isn't your task simply to send an email after

Re: [PHP-DB] Re: automactic email notification

2011-04-13 Thread Jim Giner
Looking at all that code you already wrote, you're not that much of a newbie. Read up on functions. (A function is merely the same code you already run but it's set aside, out of the main execution path of your script, so that you can call it from anyplace that you need to execute that

Re: [PHP-DB] ORDER BY relevance DESC query

2011-04-12 Thread Adriano Rodrigo Guerreiro Laranjeira
Hey friend. The problem is here: ( SELECT `reference`, `organization` FROM `ministry_profiles`... In a subselect, you must select just one column. You are selecting two reference and organization. If you really need both, so you must do two subselects: one for reference and another for

Re: [PHP-DB] error

2011-04-08 Thread Bastien
On 2011-04-08, at 1:57 AM, Karl DeSaulniers k...@designdrumm.com wrote: Ooops. Sry, forgot an escape. $q = UPDATE expiringleases SET Cricket_Region = '.mysql_real_escape_string($Cricket_Region).', Market = .mysql_real_escape_string($Market).' WHERE Search_Ring =

Re: [PHP-DB] error

2011-04-07 Thread Karl DeSaulniers
I believe this line should read.. ini_set('display_errors', 1); Just something I think I caught. Might not be your solution though. HTH, Karl On Apr 7, 2011, at 11:00 PM, Chris Stinemetz wrote: ini_set('display_errors', '1'); Karl DeSaulniers Design Drumm http://designdrumm.com -- PHP

Re: [PHP-DB] error

2011-04-07 Thread Jim Giner
The two query statements are different - in one you quote $id and in the other you don't. It is definitely a mysql error so it's not the line you suggested. Karl DeSaulniers k...@designdrumm.com wrote in message news:6fe62364-f9fc-4612-8c5d-6ce48fc66...@designdrumm.com... I believe this line

Re: [PHP-DB] error

2011-04-07 Thread Chris Stinemetz
I am pretty sure it is in my code. I am just getting an error form one of my echoes. Still can't get it to work correctly though. Any help is greatly appreciated. Thank you, Chris ?php /* EDIT.PHP Allows user to edit specific entry in database */ // creates the edit record form // since

Re: [PHP-DB] error

2011-04-07 Thread Karl DeSaulniers
Hi Chris, I believe you only need to do a htmlspecialchars when displaying data as readable text that your retrieved from the database after inserting. And probably some other situations as well, but I don't think you need to do htmlspecialchars on the mysql_real_escape data when inserting

Re: [PHP-DB] error

2011-04-07 Thread Karl DeSaulniers
Hi Chris, Try this.. Or season to taste.. $q = UPDATE expiringleases SET Cricket_Region = '.mysql_real_escape_string($Cricket_Region).', Market = . $Market.' WHERE Search_Ring = '.mysql_real_escape_string($id).'; mysql_query($q) or die(mysql_error()); Best, Karl On Apr 8, 2011, at 12:13

Re: [PHP-DB] error

2011-04-07 Thread Karl DeSaulniers
Ooops. Sry, forgot an escape. $q = UPDATE expiringleases SET Cricket_Region = '.mysql_real_escape_string($Cricket_Region).', Market = .mysql_real_escape_string($Market).' WHERE Search_Ring = '.mysql_real_escape_string($id).'; mysql_query($q) or die(mysql_error()); Best, Karl On Apr

Re: [PHP-DB] Need Help with PHP Mails

2011-04-04 Thread Will Lunden
Hi Guru, Have you already made the php script that includes the mail function? If there is an error in your php that is preventing the mail function from working properly, I or someone else may be able to help you correct it if you were to send the php you have written so far. -Will 2011/4/4

Re: [PHP-DB] Need Help with PHP Mails

2011-04-04 Thread Guru™
Hi Will, Below is my final PHP code, and its working now. However this is just a small piece of the form that I have created. In my original form I have more then 50 fields and variables. Now I am not sure how to expand this code having all 50 fields. Can the mail function will take that much

Re: [PHP-DB] Need Help with PHP Mails

2011-04-04 Thread Will Lunden
Hi Guru, Glad to hear it's working! Yes the mail function will be able to handle all the fields, it should be as simple as repeating what you've already done for all of the remaining fields - Will On Apr 4, 2011, at 1:09 PM, Guru™ nagendra802...@gmail.com wrote: Hi Will, Below is my

Re: [PHP-DB] Re: jpgraph and mysql passing array

2011-03-27 Thread Chris Stinemetz
On Sat, Mar 26, 2011 at 9:44 PM, Brian Smither bhsmit...@gmail.com wrote: Would you try an experiment? Thanks for for the suggestion but this didn't seem to work. I beleive it is a header conflict based on what I have researched. I just can't seem to find a solution. In this line: $sql =

Re: [PHP-DB] Stored Procedures, Dynamic SQL or static SQL and testing.

2011-03-26 Thread Geoff Lane
On Saturday, March 26, 2011, Richard Quadling wrote; What preferences do you all have when using SQL. Stored Procedures or PHP generated dynamic SQL or parameterized static SQL. Whichever you use how do you test them? Do you use unit testing in your PHP code? If so, do you also have unit

Re: [PHP-DB] Stored Procedures, Dynamic SQL or static SQL and testing.

2011-03-26 Thread Bastien
On 2011-03-26, at 9:00 AM, Richard Quadling rquadl...@gmail.com wrote: Hi. What preferences do you all have when using SQL. Stored Procedures or PHP generated dynamic SQL or parameterized static SQL. I used both. SPs work for some of the larger reports, especially when combined with a

Re: [PHP-DB] jpgraph and mysql passing array

2011-03-24 Thread Simcha Younger
On Wed, 23 Mar 2011 15:59:50 -0500 Chris Stinemetz chrisstinem...@gmail.com wrote: Hello, ?php echo You Selected the following:brMarket = $term brCell_Sector = $term2brTimestamp = $term3br; ? note the closing PHP tag above, and now this line here, is not in php, and does not echo the

Re: [PHP-DB] testing

2011-03-19 Thread Daniel Brown
On Fri, Mar 18, 2011 at 17:35, Jim Giner jim.gi...@albanyhandball.com wrote: first time poster There's no need to test. We've known it's worked for years. -- /Daniel P. Brown Network Infrastructure Manager http://www.php.net/ -- PHP Database Mailing List (http://www.php.net/) To

RE: [PHP-DB] ucwords for mySQL?

2011-03-19 Thread Oddity Software LLC
Need a custom function: BEGIN DECLARE c CHAR(1); DECLARE s VARCHAR(128); DECLARE i INT DEFAULT 1; DECLARE bool INT DEFAULT 1; DECLARE punct CHAR(17) DEFAULT ' ()[]{},.-_!@;:?/'; SET s = LCASE( str ); WHILE i LENGTH( str ) DO BEGIN SET c = SUBSTRING( s, i, 1 ); IF

Re: [PHP-DB] ucwords for mySQL?

2011-03-19 Thread Karl DeSaulniers
Try this, $String = strtolower($String); or $String = strtoupper($String) then plug into MySQL Best, Karl On Mar 19, 2011, at 1:21 PM, Oddity Software LLC wrote: Need a custom function: BEGIN DECLARE c CHAR(1); DECLARE s VARCHAR(128); DECLARE i INT DEFAULT 1; DECLARE bool INT

Re: [PHP-DB] UPDATE IF

2011-03-14 Thread Richard Quadling
On 14 March 2011 15:42, Gary gp...@paulgdesigns.com wrote: I have a table in a mysql db that has 3 columns that I want to insert (update) data if the rowcolumn is empty (IS NULL).  However I want to start at the first column, if this column is not null, then move to insert the data into column

Re: [PHP-DB] RE: SELECT WHERE length of content question

2011-03-11 Thread Constantin Brinzoi
Do not forget to use TRIM function as well: LENGTH(TRIM(fax)) in order to elliminate leading and trailing spaces. Aurel - Original Message - From: Geoffrey Pitman geoffrey.pit...@gmail.com To: php-db@lists.php.net Sent: Friday, March 11, 2011 7:59 PM Subject: [PHP-DB] RE: SELECT

Re: [PHP-DB] SELECT WHERE length of content question

2011-03-09 Thread kesavan trichy rengarajan
Have a look at this: http://dev.mysql.com/doc/refman/5.1/en/string-functions.html#function_char-length On Thu, Mar 10, 2011 at 9:49 AM, Ron Piggott ron.pigg...@actsministries.org wrote: Is there a command in mySQL that would allow me to SELECT the rows where the `fax` column is more than 11

Re: [PHP-DB] SELECT WHERE length of content question

2011-03-09 Thread Daniel Brown
On Wed, Mar 9, 2011 at 17:49, Ron Piggott ron.pigg...@actsministries.org wrote: Is there a command in mySQL that would allow me to SELECT the rows where the `fax` column is more than 11 characters long? There is. SELECT * FROM tblName WHERE CHAR_LENGTH(fax) = 11; (Presuming you

Re: [PHP-DB] PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/mysql.so'

2011-03-08 Thread nagendra prasad
Are you getting any error msg while installing it. Try to get a new copy of php-mysql from internet and install it. On Tue, Mar 8, 2011 at 4:17 PM, Scott Wen wen.xue...@gmail.com wrote: Hi, I installed mysql and php. Its OK. After I install php-mysql, the following messages come out.

Re: [PHP-DB] UPDATE query

2011-03-08 Thread Bastien Koert
On Tue, Mar 8, 2011 at 11:16 AM, Ron Piggott ron.pigg...@actsministries.org wrote: I am wondering if there is a way to do an UPDATE query where only some of the text changes. The column I need to modify is named “toll_free” What I need to search for is: 800- I need it to replace it with is

Re: [PHP-DB] UPDATE query

2011-03-08 Thread Ron Piggott
I was wondering this Bastien. Ron The Verse of the Day “Encouragement from God’s Word” http://www.TheVerseOfTheDay.info -Original Message- From: Bastien Koert Sent: Tuesday, March 08, 2011 11:20 AM To: Ron Piggott Cc: php-db@lists.php.net Subject: Re: [PHP-DB] UPDATE query On Tue

Re: [PHP-DB] UPDATE query

2011-03-08 Thread Ron Piggott
, March 08, 2011 11:20 AM To: Ron Piggott Cc: php-db@lists.php.net Subject: Re: [PHP-DB] UPDATE query On Tue, Mar 8, 2011 at 11:16 AM, Ron Piggott ron.pigg...@actsministries.org wrote: I am wondering if there is a way to do an UPDATE query where only some of the text changes. The column I need

Re: [PHP-DB] Prepared Statements # of rows

2011-03-04 Thread Adriano Rodrigo Guerreiro Laranjeira
Hey friend! You can use the PDOStatement::RowCount, but there is a problem (extracted from the PHP Manual, http://php.net/manual/en/pdostatement.rowcount.php): PDOStatement-rowCount - Returns the number of rows affected by the last SQL statement. If the last SQL statement executed by the

Re: [PHP-DB] Error while inserting data into mysql

2011-03-01 Thread Richard Quadling
On 1 March 2011 10:25, nagendra prasad nagendra802...@gmail.com wrote: Hi All, I have 2 simple php pages. One with the form just like some sales voucher. Another is to print in a proper format and to insert the form database into mysql. When I enter some data in the sales voucher everything

Re: [PHP-DB] Re: [PHP-WIN] Re: Error while inserting data into mysql

2011-03-01 Thread Geoff Lane
On Tuesday, March 1, 2011, Richard Quadling wrote; Can you tell me what column in the table is scloth100_qty? I can't find it. The issue here is probably that you have some PHP code that is passing a SELECT statement to MySQL and that SELECT includes scloth100_qty in its column list. One

Re: [PHP-DB] Re: [PHP-WIN] Re: Error while inserting data into mysql

2011-03-01 Thread nagendra prasad
Thanks Geoff Lane, I saw my mistake. Their was no scloth100_qty in my mysql table. Once again Thanks buddy :) On Tue, Mar 1, 2011 at 4:53 PM, Geoff Lane ge...@gjctech.co.uk wrote: On Tuesday, March 1, 2011, Richard Quadling wrote; Can you tell me what column in the table is scloth100_qty? I

Re: [PHP-DB] Need help with an extra backslash

2011-03-01 Thread Design in Motion Webdesign
Try the stripslashes() function. See on http://php.net/manual/en/function.stripslashes.php for details. Best regards. Steven Hi All, I have a list of product in which WIRE MESH 24G X 3/4 is one of them. When I am trying to print the same its coming like WIRE MESH 24G X 3/4\. I want to

Re: [PHP-DB] CSV to MyDB

2011-02-25 Thread Adriano Rodrigo Guerreiro Laranjeira
Hey friend! You can create a DB table with the same structure of your CSV and store it like a normal table, using the mysqlimport command: http://dev.mysql.com/doc/refman/5.5/en/mysqlimport.html In this way, you can do SELECT's and all DML commands. If you want to store the file as you

Re: [PHP-DB] CSV to MyDB

2011-02-25 Thread Karl DeSaulniers
I see. Thank you for that and thank you for the link. Best, Karl Sent from losPhone On Feb 25, 2011, at 10:57 AM, Adriano Rodrigo Guerreiro Laranjeira adri...@argl.eng.br wrote: Hey friend! You can create a DB table with the same structure of your CSV and store it like a normal table,

Re: [PHP-DB] Cant Get Data

2011-02-22 Thread Amit Tandon
Dear Gary $_SESSION variable would be available only if you have session_start() at the top of the page. For $_POST, i presume u hve method POST defined for the form element regds amit The difference between fiction and reality? Fiction has to make sense. On Mon, Feb 21, 2011 at

Re: [PHP-DB] Submitting data to MySQL database using HTML/PHP form

2011-02-21 Thread Daniel Brown
On Sun, Feb 20, 2011 at 16:43, Donovan Brooke li...@euca.us wrote:         $insert = INSERT INTO user_info(login,password) VALUES('.mysql_real_escape_string($login).','.mysql_real_escape_string($password).'); Look at that one more time Dan. ;-) Yeah, well, that's why one should never

Re: [PHP-DB] Submitting data to MySQL database using HTML/PHP form

2011-02-21 Thread Nazish Zafar
Thanks! Even with the typo, the issue was resolved with your helpful comments! Thanks also for the pointer on using mysql_real_escape to 'sanitize' the user input, it's definitely become a part of my coding. On Mon, Feb 21, 2011 at 8:22 AM, Daniel Brown danbr...@php.net wrote: On Sun, Feb 20,

Re: [PHP-DB] Submitting data to MySQL database using HTML/PHP form

2011-02-20 Thread Daniel Brown
On Sun, Feb 20, 2011 at 14:11, Nazish Zafar naz...@jhu.edu wrote: $insert = INSERT INTO user_info (login, password) VALUES ($login, $password); You're using double-quotes to encapsulate your $insert variable data, then never closing them. What's more, you're also using double-quotes to

Re: [PHP-DB] Submitting data to MySQL database using HTML/PHP form

2011-02-20 Thread Donovan Brooke
Daniel Brown wrote: On Sun, Feb 20, 2011 at 14:11, Nazish Zafarnaz...@jhu.edu wrote: $insert = INSERT INTO user_info (login, password) VALUES ($login, $password); You're using double-quotes to encapsulate your $insert variable data, then never closing them. What's more, you're also

Re: [PHP-DB] Displaying Results

2011-02-15 Thread Donovan Brooke
Ethan Rosenberg wrote: Dear List - I have a form. In one field, the customer types the name of a product. The first seven(7) results of the MySQL query that the entry generates should be displayed as a clickable drop down list. How do I do it? Thanks. Ethan MySQL 5.1 PHP 5.3.3-6 Linux

Re: [PHP-DB] Doctrine or another recomended ORM?

2011-02-03 Thread Miriam Natanzon
Hi, At the beginning I also think about Doctrine, BUT- I really don't like the way it uses comments for type declaration.I think this is a miss use of comments. miriam On Tue, Feb 1, 2011 at 8:41 PM, Ruwan Geeganage rpgeegan...@gmail.comwrote: Hi Natanzon, Doctrine is good. check this

Re: [PHP-DB] Doctrine or another recomended ORM?

2011-02-01 Thread Philip Thompson
http://cakephp.org/ On Jan 16, 2011, at 6:02 AM, Miriam Natanzon wrote: Hi, I want to choose an open-source ORM platform to use as a base for many different applications as a standard environment in my organization. ( we used DBI for PERL in the past). I saw and read about Doctrine -

Re: [PHP-DB] Doctrine or another recomended ORM?

2011-02-01 Thread Ruwan Geeganage
Hi Natanzon, Doctrine is good. check this post also http://www.geeganage.com/symfony-doctrine-emory-usage/ http://www.geeganage.com/symfony-doctrine-emory-usage/Propel is also good, but I think Doctrine is better. Thanks. On Tue, Feb 1, 2011 at 10:08 PM, Philip Thompson

Re: [PHP-DB] Leap Year

2011-01-31 Thread Bastien Koert
On Mon, Jan 31, 2011 at 8:06 AM, Ron Piggott ron.pigg...@actsministries.org wrote: Does mySQL have the ability to figure out if it is leap year?  If so, what is the correct syntax for: AND `day` 366 unless it is leap year Ron The Verse of the Day “Encouragement from God’s Word”

Re: [PHP-DB] RSS Feed

2011-01-30 Thread Bastien Koert
On Sun, Jan 30, 2011 at 2:27 PM, Ron Piggott ron.pigg...@actsministries.org wrote: I have a question about the mySQL query below.  The purpose is to find the last 15 days Bible reading for an RSS feed. In the table each day’s reading is assigned the day # in the year (between 1 and 365).  

Re: [PHP-DB] RSS Feed

2011-01-30 Thread Ron Piggott
Message- From: Bastien Koert Sent: Sunday, January 30, 2011 4:10 PM To: Ron Piggott Cc: php-db@lists.php.net Subject: Re: [PHP-DB] RSS Feed On Sun, Jan 30, 2011 at 2:27 PM, Ron Piggott ron.pigg...@actsministries.org wrote: I have a question about the mySQL query below. The purpose is to find

Re: [PHP-DB] stripslashes ( encodings to from MySQL )

2011-01-28 Thread Donovan Brooke
Sorry, should have done some simple testing!.. It appears that stripslashes is smarter than simply stripping all /. So, my apologies for interrupting the class! ;-) Donovan -- D Brooke -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2011-01-27 Thread Richard Quadling
On 26 January 2011 23:52, Donovan Brooke li...@euca.us wrote: [snip] print = !-- problem --;        ^ Never mind, found it. :-/ Donovan -- D Brooke -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Considering that the error

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

2011-01-27 Thread Karl DeSaulniers
On Jan 27, 2011, at 4:00 AM, Richard Quadling wrote: On 26 January 2011 23:52, Donovan Brooke li...@euca.us wrote: [snip] print = !-- problem --; ^ Never mind, found it. :-/ Donovan -- D Brooke -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

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

2011-01-27 Thread Donovan Brooke
Hello, to respond to some of the comments/questions.. No, it wasn't parsing anything... and yes, I put ini_set('display_errors', 1); error_reporting(E_ALL | E_STRICT); at the top of the page. (as well as there is a custom built PHP management app that allows to turn on the display_errors..

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 displayed

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

2011-01-26 Thread Donovan Brooke
[snip] print = !-- problem --; ^ Never mind, found it. :-/ Donovan -- D Brooke -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] bool type (between MySQL and PHP)

2011-01-25 Thread Daniel Brown
On Tue, Jan 25, 2011 at 17:05, Donovan Brooke li...@euca.us wrote: What is the best PHP practice when using bools with MySQL? Save 1's and 0's instead of true/false? You could either do an INT(1) DEFAULT 0 or an ENUM('Y','N') to make it easier on yourself. -- /Daniel P. Brown Network

Re: [PHP-DB] bool type (between MySQL and PHP)

2011-01-25 Thread Donovan Brooke
Daniel Brown wrote: On Tue, Jan 25, 2011 at 17:05, Donovan Brookeli...@euca.us wrote: What is the best PHP practice when using bools with MySQL? Save 1's and 0's instead of true/false? You could either do an INT(1) DEFAULT 0 or an ENUM('Y','N') to make it easier on yourself. Thanks

Re: [PHP-DB] bool type (between MySQL and PHP)

2011-01-25 Thread Daniel Brown
On Tue, Jan 25, 2011 at 17:40, Donovan Brooke li...@euca.us wrote: Thanks Dan, I think the error would still persist using DEFAULT.. because as mentioned, I don't think MySQL likes: UPDATE tablename SET vbool= ..which is not great news for me since I'd like to avoid having to redo all my

Re: [PHP-DB] bool type (between MySQL and PHP)

2011-01-25 Thread Donovan Brooke
Daniel Brown wrote: On Tue, Jan 25, 2011 at 17:40, Donovan Brookeli...@euca.us wrote: Thanks Dan, I think the error would still persist using DEFAULT.. because as mentioned, I don't think MySQL likes: UPDATE tablename SET vbool= ..which is not great news for me since I'd like to avoid

Re: [PHP-DB] Re: Getting Results

2011-01-21 Thread Richard Quadling
On 21 January 2011 11:58, Karl DeSaulniers k...@designdrumm.com wrote: I did not know you could do a SELECT inside a SELECT. Commonly known as a sub select. You can use them like ... SELECT columns FROM ( SELECT columns FROM table) WHERE column IN (SELECT column FROM table) As part of a FROM

Re: [PHP-DB] Re: Getting Results

2011-01-21 Thread Karl DeSaulniers
Ahh yes, I remember that now. Thank you. Karl On Jan 21, 2011, at 6:17 AM, Richard Quadling wrote: On 21 January 2011 11:58, Karl DeSaulniers k...@designdrumm.com wrote: So to do descending order I'd put DES or DEC? Just curious about that one. ASC and DESC -- Richard Quadling Twitter

Re: [PHP-DB] Re: Getting Results

2011-01-21 Thread Karl DeSaulniers
Very informative, Thank you Richard. I will have to flag this one and come back to it. My database structure may require something of this measure down the line with the auditing ability I plan on building into the admin section. Never heard of USE AdventureWorks. Is that a SQL system

<    5   6   7   8   9   10   11   12   13   14   >