Re: [PHP-DB] String manipulation

2009-09-11 Thread olavi
You can do like this: $str = 'helloworld'; echo preg_replace('//', ' ', $str); this will print out -> h e l l o w o r l d Olavi Ivask > How would I put a space after each letter: > > echo str_shuffle(stripslashes(mysql_result($word_result,0,"word")); > > Ron -- PHP Database Mailing List (

Re: [PHP-DB] String manipulation

2009-09-11 Thread boclair
Ron Piggott wrote: How would I put a space after each letter: echo str_shuffle(stripslashes(mysql_result($word_result,0,"word")); Ron CSS best handles styling E.G. OR $word_result"; ?> Increase the em value to customize the spacing Louise -- PHP Database Mailing List (http://w

[PHP-DB] String manipulation

2009-09-10 Thread Ron Piggott
How would I put a space after each letter: echo str_shuffle(stripslashes(mysql_result($word_result,0,"word")); Ron

Re: [PHP-DB] String comparision issue with change of databases

2007-11-24 Thread $P$ $T$
On Nov 23, 2007 5:42 PM, Stut <[EMAIL PROTECTED]> wrote: > Tamkhane, Pravin wrote: > > Hi All, > > I am trying to write a simple user verification(not using MD5 hash) . I > > have users table in database which contains login_id and passwd for > > registered users. I am using PDO for this purpose. I

Re: [PHP-DB] String comparision issue with change of databases

2007-11-23 Thread Stut
Tamkhane, Pravin wrote: Hi All, I am trying to write a simple user verification(not using MD5 hash) . I have users table in database which contains login_id and passwd for registered users. I am using PDO for this purpose. If i use MySQL database, following code for user verification works wel

[PHP-DB] String comparision issue with change of databases

2007-11-23 Thread Tamkhane, Pravin
Hi All, I am trying to write a simple user verification(not using MD5 hash) . I have users table in database which contains login_id and passwd for registered users. I am using PDO for this purpose. If i use MySQL database, following code for user verification works well without any problem. Bu

RE: [PHP-DB] String manipulation

2005-05-02 Thread Bastien Koert
7;],1); Bastien From: "Chris Payne" <[EMAIL PROTECTED]> To: Subject: [PHP-DB] String manipulation Date: Mon, 2 May 2005 00:48:58 -0400 Hi there everyone, I'm working with a mysql Db where I have a single string that I have to split into 2 strings, the first character is the first

[PHP-DB] String manipulation

2005-05-01 Thread Chris Payne
Hi there everyone, I'm working with a mysql Db where I have a single string that I have to split into 2 strings, the first character is the first name and I have that split off into it's own variable, but what I need to know is what's the best method to read the string again BUT ignore the firs

RE: [PHP-DB] String pictures in MySQL

2005-03-18 Thread Bastien Koert
examples of how to get them into the db (use a blob field) http://www.weberdev.com/get_example-4063.html and get the out http://www.weberdev.com/get_example-4062.html bastien From: Bunmi AKinmboni <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: [PHP-DB] String pictures in MySQL Dat

[PHP-DB] String pictures in MySQL

2005-03-17 Thread Bunmi AKinmboni
I want to store picture in a MySQL field. What type do I call the field and any guide or link on the net to tell me how to store the picture? Bunmi from Lagos -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] String Parsing/Escaping

2005-01-09 Thread Alexander Mueller
Jochem Maas wrote: hi Alexander, interesting question regarding 'safety' v. readability v. speed - I'm sure you'll get different views depending on who you ask. Here is my take: Thank you Jochem! :) I rate speed as the least important issue - you can alway use a faster machine, get some more RAM

Re: [PHP-DB] String Parsing/Escaping

2005-01-09 Thread Jochem Maas
hi Alexander, interesting question regarding 'safety' v. readability v. speed - I'm sure you'll get different views depending on who you ask. Here is my take: Alexander Mueller wrote: Hi, below are three versions of an SQL call along with escaping the passed value. > $value=mysql_escape_string

[PHP-DB] String Parsing/Escaping

2005-01-08 Thread Alexander Mueller
Hi, below are three versions of an SQL call along with escaping the passed value. > $value=mysql_escape_string($_POST['value']); > mysql_query('SELECT * FROM table WHERE field="'.$value.'"'); + Fastest Code - Con: Bad Readability, Value needs to be escaped separately > $value=mysql_escap

Re: [PHP-DB] String question

2004-12-14 Thread Jochem Maas
Chris Payne wrote: Hi there everyone, I am having to read a string with text in, but the way the DB is written in the same string you have the price, for example” this doesn't sound like a DB problem, sounds more like a regexp problem. (i.e. php-db is probably the wrong list) CASARON 4G 50lb

[PHP-DB] String question

2004-12-14 Thread Chris Payne
Hi there everyone, I am having to read a string with text in, but the way the DB is written in the same string you have the price, for example” CASARON 4G 50lb Sacks in Ton Lots $88.00 How can I strip out the 88.00 (Baring in mind it could be any number) into it’s own string? Tha

RE: [PHP-DB] String handling

2004-09-30 Thread Darryl
Darryl'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] String handling If you use the value from a text box in a mathematical equation or comparison, PHP will automatically attempt to handle it as an integer or some other numeric type (e.g., float). So if you did something like: if($_POST["myvar

RE: [PHP-DB] String handling

2004-09-30 Thread Hutchins, Richard
ut check out the parts of the PHP documentation I cited and you should be able to figure out what needs to be done. HTH, Rich > -Original Message- > From: Darryl [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 30, 2004 10:42 AM > To: [EMAIL PROTECTED] > Subject: [PH

Re: [PHP-DB] String handling

2004-09-30 Thread Joseph Crawford
$string = '10001'; if((int)$string) > 1) { echo 'Yep it is'; } -- Joseph Crawford Jr. Codebowl Solutions [EMAIL PROTECTED] 802-558-5247 For a GMail account contact me OFF-LIST -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] String handling

2004-09-30 Thread Darryl
Hay, Is there a way to make a string into an integer? I have a value coming from a textbox and I want to check if the amount in it is < 1. Thanks, Darryl

[PHP-DB] string manipulation

2003-02-18 Thread Martin Dziura
Hello everyone, this is my first post, so please bare with me. I am very new to php and i am currently working on modifying existing php e-commerce site. so my question is as follow and its more of a general question but it involves a db so i thought i would ask here i have a mysql db, in one

RE: [PHP-DB] string

2002-10-31 Thread John Coder
gt; > SELECT SUBSTRING(monthname(blah), 0, 3) AS monthAbbrev FROM tablename > > from memory > > HTH > > beau > > // -Original Message- > // From: John Coder [mailto:jcoder@;insightbb.com] > // Sent: Friday, 1 November 2002 9:47 AM > // To: [EMAIL PROTECTE

RE: [PHP-DB] string

2002-10-31 Thread John W. Holmes
DATE_FORMAT(your_column,'%b') or SUBSTRING() ---John Holmes... > -Original Message- > From: John Coder [mailto:jcoder@;insightbb.com] > Sent: Thursday, October 31, 2002 8:47 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] string > > I want to list months

RE: [PHP-DB] string

2002-10-31 Thread Beau Lebens
@;insightbb.com] // Sent: Friday, 1 November 2002 9:47 AM // To: [EMAIL PROTECTED] // Subject: [PHP-DB] string // // // I want to list months found in db by the first three letters as in an // abbrevaition of the months i.e.: // Jan // Feb // Mar // Apr // and so forth // I can get the names by

[PHP-DB] string

2002-10-31 Thread John Coder
I want to list months found in db by the first three letters as in an abbrevaition of the months i.e.: Jan Feb Mar Apr and so forth I can get the names by monthname(blah) but am stuck on converting strings to first three letters I"ve been trying explode("",$blah) but that doesn't work. I'm at a l

[PHP-DB] String extraction from blobs. Extracted string to be placed into field within another table.

2002-10-20 Thread dwalker
What is the most effective method of extracting from a blob specified text to be placed into another table field.         This email message and all attachments transmitted herewith are tradesecret and/or confidential information intended only for the viewing and use of addressee.  If the rea

RE: [PHP-DB] string concatenattion

2002-09-23 Thread M . A . Bond
The line $str= buffer[$i]; Should probably read: $str .= buffer[$i]; Mark -Original Message- From: roslyn jose [mailto:[EMAIL PROTECTED]] Sent: 23 September 2002 11:39 To: [EMAIL PROTECTED] Subject: [PHP-DB] string concatenattion hi, i have an array of strings and would like to

AW: [PHP-DB] string concatenattion

2002-09-23 Thread Claudia Schasiepen
Hey, try $str = "str.buffer[$i]; since . does the concatenation. Best regards Claudia -Ursprungliche Nachricht- Von: roslyn jose [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 23. September 2002 12:39 An: [EMAIL PROTECTED] Betreff: [PHP-DB] string concatenattion hi, i have an

[PHP-DB] string concatenattion

2002-09-23 Thread roslyn jose
hi, i have an array of strings and would like to create a single string from the array but starting somewhere in the middle of the array index and not from the start, is there any function for me to do a string concatenation. ive gone thro the manula and didnt find any, but if u have any brig

Re: [PHP-DB] string

2002-07-21 Thread bo
$8a881a30$[EMAIL PROTECTED] > list( name, rest ) = explode( '@', $email ); > > name = everything before the @ > rest = everything after @ > > .: B i g D o g :. > > > > - Original Message - > From: "bo" <[EMAIL PROTECTED]> > To

Re: [PHP-DB] string

2002-07-21 Thread Ray Hunter
list( name, rest ) = explode( '@', $email ); name = everything before the @ rest = everything after @ .: B i g D o g :. - Original Message - From: "bo" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, July 21, 2002 4:42 PM Subject: [PHP-DB] s

[PHP-DB] string

2002-07-21 Thread bo
Hi, for any email end with @companyemail.com such as [EMAIL PROTECTED] how do I strip only the portion(in this case:bo) before the common ending:@companyemail.com ? Thanks a bunch! PHP: the solution to the web problem Best Regards to PHP Community Bo -- PHP Database Mailing List (http://ww

Re: [PHP-DB] String datetime to DateTime

2002-06-20 Thread Glenn Holden
their %s (yes that was a typo) looks for a space > as a delimiter and not the specified next one. > > Easiest workarounds off the cuff... > 1) sscanf() to get the bulk of the data out, then regex out the %s string. > 2) eregi_replace() Jun with the numeric > 3) Dump it as numeric

Re: [PHP-DB] String datetime to DateTime

2002-06-20 Thread szii
instead of a string month name 4) eregi_replace() the /'s with spaces then sscanf() it. 'Luck -Mike - Original Message - From: "Glenn Holden" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 20, 2002 8:48 AM Subject: Re: [PHP-DB] String dat

Re: [PHP-DB] string

2002-05-17 Thread Jeremy Peterson
Sure- $test = "text1"; if(substr($test, -1) == 1){ print "do something"; } else{ print "didn't equal 1 "; At 08:00 AM 5/17/2002 -0400, Natividad Castro wrote: >Hi to all, >how can I evaluate a variable? >For example >$test = "test1"; >then I want to evaluate if $test contains

[PHP-DB] string

2002-05-17 Thread Natividad Castro
Hi to all, how can I evaluate a variable? For example $test = "test1"; then I want to evaluate if $test contains 1 at the end. Is there any way to evaluate that variable to see if the number 1 is at the end? Thanks Nato -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: h

RE: [PHP-DB] string compare function

2002-01-17 Thread matt stewart
by the way, what are you actually trying to do with the code? there may be a different way of doing it which isn't so confusing? -Original Message- From: tomhilton [mailto:[EMAIL PROTECTED]] Sent: 17 January 2002 15:20 To: [EMAIL PROTECTED] Subject: [PHP-DB] string compare function

RE: [PHP-DB] string compare function

2002-01-17 Thread matt stewart
lto:[EMAIL PROTECTED]] Sent: 17 January 2002 15:20 To: [EMAIL PROTECTED] Subject: [PHP-DB] string compare function Hi, this is more of an earlier post regarding the strcmp function and my problems with it on my Win98 machine. This is the actual code I used for the strcmp function, $errors=0;

[PHP-DB] string compare function

2002-01-17 Thread tomhilton
Hi, this is more of an earlier post regarding the strcmp function and my problems with it on my Win98 machine. This is the actual code I used for the strcmp function, $errors=0; if (empty($username)||empty($pword)||empty ($conf_pword)||empty($redirect)) { echo "Please hit your browser's back

RE: [PHP-DB] string compare function

2002-01-17 Thread matt stewart
post the entire line of code, (and the surrounding couple of lines?? and we'll get more of an idea. -Original Message- From: tomhilton [mailto:[EMAIL PROTECTED]] Sent: 17 January 2002 14:56 To: [EMAIL PROTECTED] Subject: [PHP-DB] string compare function Hi, I'm having a pr

[PHP-DB] string compare function

2002-01-17 Thread tomhilton
Hi, I'm having a problem with the stcmp() function. I have it comparing two string variables, $pword and $conf_pword, in a script. I know they both have values, but the result always compares to 1 when $pword is the first variable in the function, and -1 when $pword is the 2nd variable in the fu

RE: [PHP-DB] string problem

2001-09-14 Thread Justin Buist
PROTECTED]] > Sent: Friday, September 14, 2001 10:04 AM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] string problem > > > scenario: Win.nt 4.0 pach6a Workstation, IE 5.5, Apache/1.3.20, php 4.0.6 > wath goes wrong: when I set a string variable containing by example : " &

RE: [PHP-DB] string problem

2001-09-14 Thread Rick Emery
Don't know why you're getting problem. However, you can use stripslashes() to avoid the problem. -Original Message- From: Bruno Franx [mailto:[EMAIL PROTECTED]] Sent: Friday, September 14, 2001 10:04 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] string problem scenario: Win.nt

[PHP-DB] string problem

2001-09-14 Thread Bruno Franx
scenario: Win.nt 4.0 pach6a Workstation, IE 5.5, Apache/1.3.20, php 4.0.6 wath goes wrong: when I set a string variable containing by example : " hello "jack" " on my html page php convert it to " hello \"jack\" " and I get no errors on another machine with same configuration I get " hello "jack"

[PHP-DB] String Connection

2001-05-07 Thread Andrés García
To anyone that may know... I would like to connect with connection string in odbc_connect Any help or ideas? Thank you in advance, Andrés García -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] T