Seems to me that the problem might be in the logic (correct me if I'm wrong
- likely - but...)
In these lines :
foreach ($cart as $id = $qty)
{
if ($$id == 0)
{
unset ($cart[$id]);
.
[snip]
You unset $cart[$id] if $$id==0. Now, if you are using numeric array
indexes, then for example
Hi folks,
I don't know if everyone ever knew this, but I haven't been able to
find anything about this, anywhere...
odbc_execute has a very dangerous 'feature'. I would like to call it
a bug, because someone has implemented it on purpose I should call
it a feature...
odbc_execute takes two
Oops... sorry... I little mistake. odbc_execute ofcourse doesn't
take the statement to be executed as a parameter, but the odbc
result-id...
--
* RzE:
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
In one of my mySql tables I have a colum that contains many fields of
numbers.
for example
| id | Name | Age | Sex |
|1 | Jim | 17 | m|
|2 | Dave | 31 | f |
|3 | Fred | 25 | m|
Ok and I want to get the total value
Hi,
I have a string that says width=123 Height =456 and I need to for mat the
output as
123 x 456
is there a way to do this?
Thanks
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
- Original Message -
From: Luke [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 08, 2001 10:52 AM
Subject: [PHP-DB] Simple Question, hopefully simple answer
In one of my mySql tables I have a colum that contains many fields of
numbers.
for example
use substr
http://www.php.net/manual/en/function.substr.php
good luck
Jeroen
- Original Message -
From: Luke [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 08, 2001 11:09 AM
Subject: [PHP-DB] Deleting characters from a string...
Hi,
I have a string that says
Luke,
In one of my mySql tables I have a colum that contains many fields of
numbers.
for example
| id | Name | Age | Sex |
|1 | Jim | 17 | m|
|2 | Dave | 31 | f |
|3 | Fred | 25 | m|
Ok and I want to
- Original Message -
From: Jeroen Timmers [EMAIL PROTECTED]
To: Kunden Admin [EMAIL PROTECTED]
Sent: Friday, February 08, 2002 1:04 PM
Subject: Re: [PHP-DB] Simple Question, hopefully simple answer
- Original Message -
From: Kunden Admin [EMAIL PROTECTED]
To: Jeroen Timmers
This dosen't quite do what i need, this atually just displays the last 3
characters of the string removing everything else, I wanted to do the
opposite, but thanks anyways.
Joe Van Meer wrote:
Why couldn't you use something like this:
$mystr = substr($mystr, -3);
Joe
Jeroen
I forgot somthing
?
if (isset($submit) ) // this )
{
IF ($submit) // this is line 8
{
.
}
}
?
- Original Message -
From: George Lioumis [EMAIL PROTECTED]
To: chris [EMAIL PROTECTED]; PHP Mailing List
[EMAIL PROTECTED]
Sent: Friday, February 08, 2002
Hello,
something that you can help is the follow
try var_dump($newquery);
then you see the complete query and run it in phpmyadmin.
Jeroen
- Original Message -
From: Jonathan Underfoot [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 08, 2002 2:43 PM
Subject: [PHP-DB]
Yes, you can re-select from the same database without opeing a new
connection.
I recommend that you print the contents od $newquery to verify it contains
the string you think it should. Perhaps the apostrophes you've enclosed the
$row[] variable are not expanding.
-Original Message-
Actually, the is the same as and. So it could be written as:
mysql select e.id,fname,sum(m.miles) from employees e
- left join mileage m on m.id=e.id and month(trip_date)=3
- and substring(year(m.trip_date),3,2) = '02'
- group by e.id;
I'm just lazy...easier to
$mystring = substr($mystring,0,-3);
- Original Message -
From: Renaldo De Silva [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, February 07, 2002 8:56 PM
Subject: [PHP-DB] Need to delete charcters from a string
I need to delete the last 3 character of
You were close:
$mystr = substr($mystr, 0, -3);
-Original Message-
From: Renaldo De Silva [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 7:36 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Need to delete charcters from a string
This dosen't quite do what i need, this
Jonathan,
I'm trying to write a script that checks for multiple entries on a table in a
database. So far I've been
plagued by MySQL errors. I'm fairly confident my scripting is ok (Then again, I've
been wrong before.) I think
moreover there might be some difficulty with my theory. Then
If you are certain the format will ALWAYS be as you indicate, then try:
eregi(width=([0-9]*) height=([0-9]*), $mystring, $reg);
$newstring = $reg[1], x .$reg[2];
NOTE: I don't have PHP here at work (I've got it at home). So you may have
to tweak this.
-Original Message-
From: Luke
First, the example you give will replace is with , if is is the ONLY
work in the line. You indicate this with the ^$ construct.
Are you trying to replace only the first occurrence if is?
-Original Message-
From: Desikan [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 6:42
What does bool(false) mean?
Thats off the vardump
-J
- Original Message -
From: Jeroen Timmers [EMAIL PROTECTED]
To: Jonathan Underfoot [EMAIL PROTECTED]
Cc: [PHP-DB] [EMAIL PROTECTED]
Sent: Friday, February 08, 2002 8:58 AM
Subject: Re: [PHP-DB] MySQL / PHP Database Help
Hello,
You don't need to use var_dump. Just use the following statements:
$newquery = mysql_query(SELECT * FROM local_shows WHERE
show_date='$row[show_date]' AND venue='$row[venue]');
print $newquery;
-Original Message-
From: Jonathan Underfoot [mailto:[EMAIL PROTECTED]]
Sent: Friday,
you need to print the qeury and i guess you print the result in the var_dump
i use always var_dump instead a print because the var_dump have more info.
jeroen
- Original Message -
From: Jonathan Underfoot [EMAIL PROTECTED]
To: Jeroen Timmers [EMAIL PROTECTED]
Cc: [PHP-DB] [EMAIL
I was wondering if there is a way to search documents.
Scenario:
I have a application where it uploads MS Word documents to a server and
holds the documents location in the database. What I want is to be able to
search those Word documents via keywords.
Is this possible with PHP?
--
PHP
So if I:
Going in
$Notes = addslashes($Notes);
Going Out:
$Notes = stripslashes($Notes);
wouldn't that kill the html? or no?
Joe Van Meer [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi. addslashes() going in to db, stripslashes() coming out :)
HTH Joe :)
Hello!!!
Use LIKE in your Select statement...Like this!!
$sql = Select File_Name From Table2 WHERE File_Name LIKE '%$Search%';
$Search would come from a form...
Dan
On Friday, February 8, 2002, at 09:06 AM, [EMAIL PROTECTED] wrote:
I was wondering if there is a way to search documents.
So that statement would actually open up the MS Word document and search
it for the keywords specified?
-Original Message-
From: Dan Brunner [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 9:34 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Searching
At 9:14 -0600 2/8/02, Todd Williamsen wrote:
So if I:
Going in
$Notes = addslashes($Notes);
Going Out:
$Notes = stripslashes($Notes);
wouldn't that kill the html? or no?
I have no idea. What do you mean by in and out?
What exactly are you trying to do? Are you generating HTML for
a Web
It shouldn't. It will affect any or ' coming out.
For example, for going in to db:
$mystring = Hi there Mr O'Neil.;
$mystring = addslashes($mystring);
echo $mystring; would result in Hi there Mr O\'Neil.
When coming out of db make sure you use the stripslashes function to return
the original
Greetings!
As far as I can tell from the documentation, the OCI8 driver supports Oracle
8. However, on the ADODB site, they mention that the OCI8 driver supports
Oracle 8/9.
Can someone clarify what the status of support for Oracle 9i is in PHP? I
need to know if I need to stick with Oracle 8i
Oops, I totally misunderstood what you were trying to accomplish :) heh
Sorry for any confusion
Joe :)
Renaldo De Silva [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I need to delete the last 3 character of a string, what command can i use
o
do this.
--
Show us you table data
Show your PHP code as well
-Original Message-
From: Justin Hall [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 12:06 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] multiple entries in database
I have worked my problem down to the mysql database.
I have
Paul..
Going into the database
Coming out of the database
Please read the whole post.. 8)
-Original Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 9:40 AM
To: Todd Williamsen; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] addslashes()
At 9:14 -0600
Paul,
Sorry for the confusion...
Ok..
I have an application where it organizes candidates for positions for
HR. There is a Notes field where they can update actions with the
potential candidate. Now this can be when this person has been
contacted, conversations, or just to say this person is
At 10:06 -0600 2/8/02, Todd Williamsen wrote:
Paul,
Sorry for the confusion...
Ok..
I have an application where it organizes candidates for positions for
HR. There is a Notes field where they can update actions with the
potential candidate. Now this can be when this person has been
Paul,
No kidding I see the problem, that is why I am asking how do I solve it.
I don't need the problem re-explained to me 8)
-Original Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 10:21 AM
To: Todd Williamsen; [EMAIL PROTECTED]
Subject: RE:
At 10:22 -0600 2/8/02, Todd Williamsen wrote:
Paul,
No kidding I see the problem, that is why I am asking how do I solve it.
By writing a content parser that is intelligent enough to recognize HTML
constructs and pass them through literally, while recognizing when your
people write other stuff
Explain this...
Now I have Edit Jobs where you can do the same HTML and other SQL
specific stuff in the Job Description, that works with no problems
whatsoever, then I have this Edit Candidate page that is structured
EXACTLY the same, and the Edit Candidate craps out...
Why is that? One works
Does anyone know how to deal with this problem? If a user enters in a text
box; O'Connor's 2 x 3 When you print it out on the next web page it reads;
O\'Connor\'s 2\ x 3\ I have written a function to take care of this, but
when you try to write it to the database you get an error of unmatched
At 10:35 -0600 2/8/02, Todd Williamsen wrote:
Explain this...
Now I have Edit Jobs where you can do the same HTML and other SQL
specific stuff in the Job Description, that works with no problems
whatsoever, then I have this Edit Candidate page that is structured
EXACTLY the same, and the Edit
First, you don't have to write your own function to remove slashes. Simply
use:
$newline = stripslashes($oldline);
Second, write your lien containing slashes to the database. When you pull
it from the database, use stripslashes().
-Original Message-
From: Gary [mailto:[EMAIL
RTFM (MySQL) for COUNT() and SUM() (and many other useful functions).
My MySQL client is giving me a syntax error when I enter that command. :-)
=that?
Please post the SQL/PHP causing the problem - the list's crystal ball filter is not
working.
=dn
--
PHP Database Mailing List
Jonathan,
[have put the cc back to the list]
Is it possible to make BOTH the date and venue into a single unique index?
=Why not? Like a good woman, treat her right, and SQL will do almost anything for you:
6.5.3 CREATE TABLE Syntax
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name
No one knows???
hmm... I looked around on php.net couldn't find anything regarding this..
would I need to do these searches in MS Word docs with ASP?
Todd Williamsen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I was wondering if there is a way to search
Todd,
No one knows???
=or isn't telling?
hmm... I looked around on php.net couldn't find anything regarding this..
would I need to do these searches in MS Word docs with ASP?
=go ahead if you are aspidexterous...
=the Word document format is proprietary information - ie not 'open'. So it
I am trying to do a simple fetch of the lastest add name. I have the
following code :
$query = SELECT name FROM name ORDER BY name DESC LIMIT 1;
$latename = mysql_query($query) or die(Select Failed!);
$latename = mysql_fetch_array($latename);
echo bLastest Name Added:/b $latename
I know I
Yes,
I was thinking COM/DCOM, but then does PHP able to do that? Or do I
need to resort to ASP(Awful Scripting Pages)?
-Original Message-
From: DL Neil [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 12:40 PM
To: Todd Williamsen
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB]
At 7:46 +1300 2/9/02, Barry Rumsey wrote:
I am trying to do a simple fetch of the lastest add name. I have the
following code :
$query = SELECT name FROM name ORDER BY name DESC LIMIT 1;
$latename = mysql_query($query) or die(Select Failed!);
$latename = mysql_fetch_array($latename);
echo
Actually, PHP does COM very wellsearch the PHP-WIN list about COM and
Word and you should find some good hints and examples to get going. I
haven't accessed the keywords portion of a word document yet, but someone
wrote a spellcheck function that used the spellcheck built into Word using
PHP
Now, if I do COM with PHP, then does this need to be on a Windows
server? Currently it sits on a Linux box.
-Original Message-
From: DL Neil [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 12:40 PM
To: Todd Williamsen
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Re: Searching
correct to my knowledge.
I am not sure even running ASP on a linux server would allow you to open the
word documents, as I think ASP uses COM to do the dirty work.
of course, you could always do the world a favor and not use microsoft's
proprietary file formats in any way. an open
how can I round a float to the next highest value reguardless of the value
after the point, does anyone have any suggestion, any help would be
apreciated.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Well,
This application would eventually land on either Linux or Windows box, it
would be for internal use only, so it wouldn't get wacked too bad. I know
IIS5 has a bunch of COM built-ins.
The problem of going to like a text based documents is that this is for
resume management and 99% of the
ceil($myvalue)
-Original Message-
From: Renaldo De Silva [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 1:32 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Round a float to the next highest value despite the
value after the point
how can I round a float to the next highest
http://www.php.net/manual/en/function.ceil.php
-Original Message-
how can I round a float to the next highest value reguardless
of the value
after the point, does anyone have any suggestion, any help would be
apreciated.
--
PHP Database Mailing List (http://www.php.net/)
To
Court, Todd, et al
Actually, PHP does COM very wellsearch the PHP-WIN list about COM and
Word and you should find some good hints and examples to get going. I
haven't accessed the keywords portion of a word document yet, but someone
wrote a spellcheck function that used the spellcheck
At 15:31 -0400 2/8/02, Renaldo De Silva wrote:
how can I round a float to the next highest value reguardless of the value
after the point, does anyone have any suggestion, any help would be
apreciated.
Define next highest value.
--
PHP Database Mailing List (http://www.php.net/)
To
how can I round a float to the next highest value reguardless of the value
after the point, does anyone have any suggestion, any help would be
apreciated.
do you mean the function round maybey or ..
explain the question with an example please
--
PHP Database Mailing List
DL
Sounds cool!! Get to work! LOL!
Well, as soon as I get some idea what the hell I will be doing I will
start it, and I will keep you guys informed on it if you like. For DL's
app, it would be the opposite, but same method, but backwards, right?
-Original Message-
From: DL Neil
Todd,
Now, if I do COM with PHP, then does this need to be on a Windows
server? Currently it sits on a Linux box.
I assume if you are setting up a dynamic connection to Word, Word will have to be
running - which almost implies
a Windows box.
Whether the COM component/add-on to PHP (also?)
I just found it, what I was looking for was ceil(), that function round a
float to the next highest values no matter what is after the point
Example:$test=5.3
ceil($test) // gives 6
If you just used round you would get 5 instead of 6
Renaldo De Silva wrote:
how can I
If running meant at the process level and not just installed, then word
does not have to be running.COM creates the appropriate instances of
whatever is requested via COM. But yes, Word does have to be installed.
However, wonder what the wine project could afford this discussion? Maybe
you
I did get a reply regarding searching Word documents, and one person
said that if Word uses an ASCII format, then use the regex function..
She tried it, and it worked..so who knows!
Now I got to figure out how to use it... geez
-Original Message-
From: Shrock, Court [mailto:[EMAIL
Help!
I'm designing a search page and I need to keep the search variable alive
even after i refresh the page, I'm already using a string in the url and I
can't register a global variable because that would limit the search page
to one user at a time. How can I get the search string back into
cookies
-Original Message-
From: Renaldo De Silva [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 2:08 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] multiple query string
Help!
I'm designing a search page and I need to keep the search variable alive
even after i refresh the
isn't there any other way?
Rick Emery wrote:
cookies
-Original Message-
From: Renaldo De Silva [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 2:08 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] multiple query string
Help!
I'm designing a search page and I need to
sessions
-Original Message-
From: Renaldo De Silva [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 2:10 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] multiple query string
isn't there any other way?
Rick Emery wrote:
cookies
-Original Message-
From: Renaldo
How can I use PHP to upload a file from a client computer?
--
Ashraf Al Shafaki
ICQ me at 144936414
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
That's the same as cookies, isn't it you have to either store the id in a
cookie or at the end of the url I can't store it at the end of the url and
i don't want to use cookies.
Rick Emery wrote:
sessions
-Original Message-
From: Renaldo De Silva [mailto:[EMAIL PROTECTED]]
word dosen't use ascii text, ascii text dosen't support formatting so if
you convert your resume's into ascii text you loose all formating.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Could you make it a hidden value in a form?
-Original Message-
From: Renaldo De Silva [SMTP:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 3:15 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] multiple query string
That's the same as cookies, isn't it you have to either
Heres a form and the PHP behind it I use:
---FORM---
HTML
HEAD
TITLEAdd Pic/TITLE
/HEAD
BODY BGCOLOR=#FF TEXT=#00 LINK=#FF VLINK=#800080
form enctype=multipart/form-data action=addpic.php method=post
input type=hidden value=$com_num name=com_num
Pic to Upload(Only .jpg and .gif
I am trying to put PHP into a template HTML document that is used by a CGI
script. The PHP script isn't working at all - and even when I put some
generic line of PHP (an echo), it doesn't turn out.
Could the CGI be causing this?
Is it possible to compile PHP to allow it in CGI files?
Thanks,
I have set up a php form that allows me to fill in the information and then
it e-mails the information to the specified e-mail address. On the second
step the informatioin is poseted to the screen so I can see exactly what the
e-mail is going to look like. The problem I am having is that the
In databases, after creating a number of tables, one could usually set
relationships (or some call it relations) between these tables, by tying
some reference number in one table with the id (or index) in another table
for example, or just making any other kinds of relationships between tables
Hi there,
how is it possible to copy rows from more then one table into a temporary
table?
I have 250 city tables named after the country e.g: ca_cities. Now the user
has choosen stuff from
lets say ca and gm. I want to collect the data into a temp table and then
querry this temp table for
Hi there. You bet you can have relationships between tables! You accomplish
this by setting primary keys and foreign keys when you create you tables.
When you assign a unique identifier to a table not only do you assign a name
such as employeeid for example, you also have to set it as the primary
I know I could very easily do this after doing the
initial database call simply by calculating the two
variables, but, I was wondering if there was a way to
do this during the sql statement so my results would
already have my answer...
Here's the setup. I have two tables. Table A has the
John,
I know I could very easily do this after doing the
initial database call simply by calculating the two
variables, but, I was wondering if there was a way to
do this during the sql statement so my results would
already have my answer...
Here's the setup. I have two tables. Table A
Now why didn't I try that???
Thanks for your help. Worked like a charm!
John
--- DL Neil [EMAIL PROTECTED] wrote:
John,
I know I could very easily do this after doing the
initial database call simply by calculating the
two
variables, but, I was wondering if there was a way
to
do
Hi there,
Please help me out in the following...
?php
$is='is';
echo eregi_replace( .$is. , ,This is a test string which contains
is in dismissal);
?
Actually I want to replace is alone from the string and not all the
words that contains is...
I have tried with ^.$is.$ --- but yields
on 2/8/02 9:05 PM, Desikan at [EMAIL PROTECTED] appended the following
bits to my mbox:
Actually I want to replace is alone from the string and not all the
words that contains is...
I have tried with ^.$is.$ --- but yields nothing
This kind of question really belongs on the PHP General
I know how to do the option call e.g.
This is the list of artists already in our database :
SELECT name=artist
?php echo $option_block; ?
/SELECT
But I want to do a form where they select the option then fill out rest
of form. The option above returns the artist name, but I want to insert
the
Hi, How can I maintain MySQL transactions with PHP
Best Regards
Hayan
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi, How can I realize that one session in PHP has been ended, I mean I want
a trigger that the visitor of my website, has left ;)
Thanks
Best Regards
Hayan
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
84 matches
Mail list logo