hi,
no the both sollutions won't work cause:
I can't sort within a query cause subnetaddr is a varchar (10.10.10.10)
so it will be ordere like this
10.10.10.10
100.10.10.10
60.10.10.10
and that's not good cause 60 is smaller as 100, so with the function
ip2long() i will first make an integer
but when i used mysql_error() i got : sorry database not found
and i have privileges in mysql/ user table .. as shown below... the point is
if i changed 192.168.0.111 to localhost .. i managed to get the data ...
as my dbconnect.php file includes
?
mysql_connect(192.168.0.111 , root , password)
Another approach:
1. Load all results from the query in an array
2. Sort the array using a custom-defined user-defined comparison function
( usort() ). Study the example in the PHP manual.
Writing your own comparison function is easy:
- explode your IP addresses in 4 items each ( explode() )
-
Hello all,
have some problems to connect my php script to a remote interbase running on
W2K Server!
My systems:
DB-Server: W2K Server with interbase 5.x
Webserver: SuSE 8.0 with apache 1.3.23 and php 4.1.0
Problem:
I want to use the odbc_connect() to connect to the remote DB-Server, from
the
That's is wonderfull Hugh..
Nabil
Hugh Bothwell [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
David Shugarts [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Second poser today:
How to use either a MySQL select statement or PHP to produce a roman
numeral, starting
That's great, but what about the reverse: Roman to Arabic?
George in Oxford
-Original Message-
From: nabil [mailto:[EMAIL PROTECTED]
Sent: 11 June 2003 9:26 am
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: Now, how about Roman Numerals?
That's is wonderfull Hugh..
Nabil
Hugh
-Original Message-
From: Matthew Moldvan [mailto:[EMAIL PROTECTED]
Sent: 11 June 2003 01:03
Have you tried the built in Oracle functions in PHP?
http://us3.php.net/oracle
That's only for Oracle up to version 7.
For Oracle 8 or 9, use the OCI extension http://www.php.net/oci8.
Snijders, Mark wrote:
hi,
no the both sollutions won't work cause:
I can't sort within a query cause subnetaddr is a varchar (10.10.10.10)
so it will be ordere like this
10.10.10.10
100.10.10.10
60.10.10.10
and that's not good cause 60 is smaller as 100, so with the function
ip2long() i will
Hi, Hugh--
I am very grateful for your help and very impressed with this, but I am not
sure that I am able to confirm that it works and I am not competent to fix
it if it does not. Perhaps you can tell where I am going wrong.
I stored your script as a separate php document, RomanDigit.php. Here
George Pitcher [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
That's great, but what about the reverse: Roman to Arabic?
George in Oxford
// NOTE: the order of the table is
// important! I will use greedy parsing,
// so (for example) IX and IV must precede
// I to parse correctly.
The function mysql_query() expects a string, so you have to put select ...
in quote for it to be considered one string, instead of 4.
Have fun,
Matt.
-Original Message-
From: Jorge L. [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 10, 2003 10:26 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB]
Here's a rundown of what the script is doing based on your input:
If you pass in the number 155, here are the calculations:
$m = $num / 1000; //$m will be equal to .155
$c = ($num % 1000) / 100; //$c will be equal to 1.55
$x = ($num % 100) / 10; //$x will be equal to 5.5
$i = $num % 10; //$i will
Hi,
I have been building up a store which now has catalogue and persistant
shopping cart which I now want to submit the results (the order) to an email
for processing.
I have a mysql db called 'cart' that holds:
Cart_id, cookie_id, item_id, and quantity.
I have a 'products' table which
Richard Hutchins [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Here's a rundown of what the script is doing based on your input:
If you pass in the number 155, here are the calculations:
$m = $num / 1000; //$m will be equal to .155
$c = ($num % 1000) / 100; //$c will be equal to
Now that's sweet, Hugh. Just looked at it in the browser. Nice conversion.
You should publish this as a class so it's available from this point
forward.
Rich
-Original Message-
From: Hugh Bothwell [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 11, 2003 11:19 AM
To: [EMAIL PROTECTED]
on 11/6/03 4:09 pm, mike karthauser at [EMAIL PROTECTED] wrote:
I want to select item_code, qty from cart where cookie_id =
$_COOKIE[cartId]
//the above select needs work
And then email these to the client which I would do using php's mail
function.
Partially answering my own question:
Hi, Hugh--
Thanks for both scripts! They are absolutely what I needed for my relatively
simple case and they now work great.
While I was thrashing around in my search for a conversion script, I found a
number of items that were out there in the realm of Javascript and
postgresql, etc. They
Greetings every1 I'm wondering how I can send the details of an
order to an email address. I have a foreach loop which loops through an
array and each time round the loop it runs a query on the database to get
product details. If for instance they ordered 5 different items then I
would
Keep the context of the email in a variable, add the details of the product
in each loop. Then you can call mail() with the complete order information.
PS. Don´t you think it´s better to query the db only once asking the details
for all the products ordered?
Bruno Pereti.
- Original Message
Don't know, but it doesn't make sense to me -- Apache executes scripts
based on the file extension, how can it process both languages?
A possible work around would be to have the Ruby program exec()'d within PHP.
Alternately, do Ruby pages, but embed PHP as PHP is presently embedded in
HTML
At 02:56 PM 6/11/2003 -0300, Miles Thompson wrote:
Don't know, but it doesn't make sense to me -- Apache executes scripts
based on the file extension, how can it process both languages?
A possible work around would be to have the Ruby program exec()'d within PHP.
Alternately, do Ruby pages, but
Yes, I understand about PHP, and I would assume Ruby also executes on the
server - thus you would have primarily one or the other generating the
page. I don't see how both can execute simultaneously, without one of them
calling the other.
Miles
At 02:15 PM 6/11/2003 -0400, John R Wunderly
I have a user maintenance script. In the address maintenance page there
is a drop down for the country entry. First, I retrieve the address info
from a MySQL table. Globals are off, so I initialize the variables in
the input with $country=$_GET['country']. In the country drop down I have
Hi I'm looking to format a date but all I find is this date() function and it appears
to be for
current date?
My variable $dbrec[ListDate] is printing:
4/30/2003 0:00:00
It needs to print
4/30/2003
Am I on the right track to try to do a (with right parameters)
$formatted_date = date(M D
Building off of one of John Holmes's posts from yesterday:
$f_date = date('n/d/Y',strtotime($yourDBdate));
should do the trick.
Hope this helps.
Rich
-Original Message-
From: Steve B. [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 11, 2003 2:53 PM
To: [EMAIL PROTECTED]
Subject:
Hi every1...I'm new to this list and hope find it funny...
A question that maybe answered sometime ago:
How to create relationships between tables in MySQL?
I used a front-end exe called SQLyog for MySQL DBs, it didn't allow me to do so, and
didn't allow to convert tables and DBs into
Hi every1...I'm new to this list and hope find it funny...
Welcome to the PHP list. Your question has nothing to do with PHP. Did you
mean to post this to the MySQL list, perhaps?? :)
A question that maybe answered sometime ago:
How to create relationships between tables in MySQL?
I used a
Hi all,
I'm a new member to this mailing list and I thought I'd introduce myself.
Well, that's not completely true, I've been a member of this list in the
past under a different address, but that was at least a year ago.
Anyway, I'm a 'media architect' based in Warrington in the UK.I'm 20
Please disregard. I found an idiotic typo in my code ;-)
Paul
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi I'm working on the site http://www.handheldwarez.com
I really like these sites style of table cells and borders etc...
http://tribes.sierra.com/
http://www.planetrenegades.com/modules.php?name=Web_Linksl_op=MostPopular
http://www.tribes2maps.com/
I've seen PHP nuke templates and am thinking
Site:
http://www.handheldspecs.com
Benefit for helping:
Better your PHP/MySQL
Know what color/java/phone/game/handheld/mp3/radio/bluetooth to buy
(yes Nokia-Ngage does all this)
Link on front page of your choice
MySQL people aren't necessarily PHP programmers.
The site is in PHP so I picked
The second two sites are almost definitely Nuke jobs. You could take a glimpse
at the code and you'd know right away.
If you want some good nuke theme sites, check phpnuke.org for resources, or do a
Google search. One of my favourites (from when I had to use nuke for a project)
is mtechnik.net.
Is there an automatic way to insert an XML file into a MySQL DB through say,
Load Data InFILE?
Or does one have to Pick apart the XML with PHP and insert data into the
fields one by one, record by record?
/T
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit:
A quick google search produced this:
Creating XML from MySQL (it also talks about importing XML)
http://www.zdnet.com.au/builder/architect/database/story/0,234918,20266023,00.htm
On Wed, 11 Jun 2003 21:53:56 -0500, [EMAIL PROTECTED] wrote:
Is there an automatic way to insert an XML file
Hello,
On 06/11/2003 11:53 PM, [EMAIL PROTECTED] wrote:
Is there an automatic way to insert an XML file into a MySQL DB through say,
Load Data InFILE?
Or does one have to Pick apart the XML with PHP and insert data into the
fields one by one, record by record?
You may want to try this class:
Hello,
On 06/11/2003 11:53 PM, [EMAIL PROTECTED] wrote:
Is there an automatic way to insert an XML file into a MySQL DB through say,
Load Data InFILE?
Or does one have to Pick apart the XML with PHP and insert data into the
fields one by one, record by record?
You may want to try this class:
36 matches
Mail list logo