Hi all,
I have tried this in php.windows, no answers there and since this is kind of
db question i will try here.
IIS Win2000, MSSQL 7, PHP 4.2.3
I have script that reads about 100-200 rows in the SELECT list and it is ok.
After that, i have robust sql query for select some data from 4-5 tables,
"Radovan Radic" <[EMAIL PROTECTED]> wrote in message
news:20021112093111.53801.qmail@;pb1.pair.com...
> Hi all,
>
> I have tried this in php.windows, no answers there and since this is kind
of
> db question i will try here.
>
> IIS Win2000, MSSQL 7, PHP 4.2.3
>
> I have script that reads about 100
You can not do it directly.
You have to create a new table as a copy of the old one:
CREATE TABLE new_table
SELECT * FROM old_table
Your problem will be that the MySQL "PHP" user will probably not have the
CREATE rights.
Ignatius
"Rodrigo San Martin"
Risks are to share properly the data. You can never rely on the accuracy
of data in the flat files as those could be changing at the same
instance as your application is reading it. RDMS (not mySQL) can handle
it under relational logic mechanisms, meaning they would not read the
data that is curre
Hi everyone...
I got a bit longer now..
But i have some trouble sorting my arrays
I get this array returned.
Array ( [0] => Array ( [0] => 10 [1] => 40 [2] => 50 [3] => 80 [4] => 130 [5] => 220
[6] => 320 ) [1] => Array ( [0] => 10 [1] => 40 [2] => 50 [3] => 80 [4] => 130 [5] =>
220
Just loop through the first index, then search on the second index:
while ( list( $key, $value ) = each( $my_arr ) ) {
// now $value is your ( [0] => 10 [1] => 40 [2] => 50 [3] => 80 [4] =>
130 [5] => 220 [6] => 320 ) array
// sort your array by values
sort( $value ) ;
// get the
Hi!
I have to support a PHP-Database-solution which someone else
has developed. In addition I'm quite new to php ...
It uses Oracle 8 to display values out of the database.
Everything is running fine with php 4.1.1.
Due to security reasons I wanted to update to php 4.2.3.
I use the same values wi
are you stating the session on on the other pages with session_start()?
what errors are you getting? if you check for session_is_registered
("user") on the other pages, what do you get?
can you send some code along, its hard to see what the issue may be without
it.
Hi!
Jeffrey N Dyke schrieb:
are you stating the session on on the other pages with session_start()?
>
Yes I do! Code comes along!
"anmelden.php" does a successful db-login (db-logfile confirms that).
"content.php" runs into:
Warning: OCISessionBegin: ORA-01017: invalid username/password; logon
My guess is a register_globals problem, but it's hard to tell without
seeing your scripts.
dn wrote:
Hi!
I have to support a PHP-Database-solution which someone else
has developed. In addition I'm quite new to php ...
It uses Oracle 8 to display values out of the database.
Everything is runnin
ok i can parse a date from mySql date field
so it displays as: 08/06/1972
but if i insert it into the field in this format
then the date gets hosed.
do i have to insert as -mm-dd
can i have a form field that has mm/dd/
but then change it on insert?
how would i do this?
thanks.
-paul
--
check out the date( ) function in mysql. a quick prelude of it
is.select date(date_col, %m/%d/%Y) from table...this will take
-mm-dd and return mm/dd/
Okay this is a tough one.
I want to make a dynamic mysql update query that takes results entered into
a series of text boxes (changes from page to page) and then updates that
record in my Mysql table.
the name of the form fields are $value[$x]
where 1 <= $x <= Total number of fields
===
if i have a statement
$result = mysql_query("SELECT
labor_id,labor_ord_no,labor_wkyr,works_orders_part_no,works_orders_qty,works
_orders_customer_id,labor_qty,labor_time,labor_qty*parts_time+parts_setup AS
timea FROM labor,works_orders,parts WHERE labor_ord_no=works_orders_ord_no
AND works_orders
Hi!
Leif K-Brooks schrieb:
My guess is a register_globals problem, but it's hard to tell without
seeing your scripts.
That did the trick! Thank you very much!
I did not provide a path to php.ini so
the setting was first not read!
Now it works!
Best regards
Daniel
--
PHP Database Mailing Li
I don't think you can reference the aliased column timea in the select
clause, I know sql server won't let you do it..try and
(labor_qty*parts_time+parts_setup)>labor_time
-Original Message-
From: Steve Dodkins [mailto:Steve.Dodkins@;ebm-ziehl.co.uk]
Sent: Tuesday, November 12, 2002 10:16
Have you ran it by hand in MySQL from the command prompt with some test
data and gotten an error?
Adam
On Tue, 12 Nov 2002, Steve Dodkins wrote:
> if i have a statement
>
> $result = mysql_query("SELECT
> labor_id,labor_ord_no,labor_wkyr,works_orders_part_no,works_orders_
HELLO - this is probably a simple problem !!
Wanting to use in a html form and pass multiple value
into a php variable but does
not work. I only get a single value. Can you tell me what I am doing wrong
?
Does the multiple value get passed correctly in php
if ($task=="check")
{
pr
> -Original Message-
> From: Stephen Rhodes [mailto:stephen.rhodes@;scils.co.uk]
> Sent: 12 November 2002 16:32
>
> Wanting to use in a html form and pass
> multiple value
> into a php variable but does
> not work. I only get a single value. Can you tell me what I
> am doing wrong
> ???
I'm pretty sure all you have to do is name your select as an array like so:
Your selected values will come across as an array called $icon.
If you need more info on this and how to use it, there's lots in the
archives. That's where I found the info I needed.
Good luck.
Rich
> -Original
using the [] makes your variable an array when it comes into php.
**snip**
else
{
print '
Multiple Check:
False
True
';
}
**snip**
Cheers - query Answered
"Stephen Rhodes" <[EMAIL PROTECTED]> wrote in message
news:20021112162930.65021.qmail@;pb1.pair.com...
> HELLO - this is probably a simple problem !!
>
> Wanting to use in a html form and pass multiple
value
> into a php variable but does
> not work. I only get a sing
Greetings
SQLyog v2.51. The definitive Windows Front End for
MySQL. SQLyog is FREE!
Some of the new features added in SQLyog 2.51 are -
-- Alter Table structure in an easy to use Grid mode.
-- Optimized for speed and network resources.
-- Insert / Update data in a table.
-- Insert / Update
Top man!!
Many thanks
Steve
-Original Message-
From: [EMAIL PROTECTED] [mailto:epeloke@;echoman.com]
Sent: 12 November 2002 16:02
To: Php-Db (E-mail)
Subject: RE: [PHP-DB] sql select
I don't think you can reference the aliased column timea in the select
clause, I know sql server won't
Hello,
I have build a php calendar and want to implement 2 week payperiods so
staff can enter their hours worked. Then I can summarize work done per
pay period.
Any idea what the easiest way to do this is? I could hard code a
starting date into a database, then go up 2 weeks at a time from there.
$nextpayperiod = mktime(0,0,0,$month,$day+14,$year);
$humanreadabledate = date("r",$nextpayperiod);
where $month is numeric month, $day is the last payperiod day (1-31), and
$year is the year of the payperiod.
$nextpayperiod will equal the unix timestamp of 14 days from the last payperiod.
Peter
I would think that the hard coded date is the way I'd do that.
maybe not neccessarily a start_dt, but maybe a pay_pd_st date. This date is just the
date the payperiod falls on. You increment it once every two weeks. Have a table in
your db with that field and variable. maybe hardcode the very fi
Making an update query that adapts to the number of fields that are to be
updated
Is there anyway to do like a for loop to create the values part of the query
then combine it with the first part of the string.
something like what i have below... although something that works correctly
as thi
$query = "UPDATE tablename SET ";
foreach($_POST AS $key => $value)
$query .= "$key = '$value',";
$query[strlen($query)-1] = "";
$query .= " WHERE id = '$_GET[id]';
Or something?
On Tue, 2002-11-12 at 13:58, David Rice wrote:
>
>
> Making an update query that adapts to the number of fie
How about:
function do_query ($table, $fields, $where)
{
$sql = 'update ' . $table . ' Set ';
foreach ($fields as $k=>$v)
$sql = $k . ' = \'' . $v . '\',';
return mysql_query ($sql);
}
Not sure if it adapts 100% to your case but you can probably fix it
up..
I don't know what your application or requirements are, but here's something
to think about...
If each pay period will ALWAYS be in two week increments from the date you
hard code, then you're fine just hard coding the first one and incrementing
automatically after that. However, if you're in one
Our payperiods will always be 2 week increments.
So if I specify a starting day in the database I need to have that
starting day always updated to the current starting day. (when we switch
to the new payperiod), so as Jerrad mentioned I could use a cron job.
But how would I be able to look at pa
Put the dates for employees into one table.
In another, put the payperiods.
You could populate the payperiods table for the next 90 years if you wanted
if it is always on a 2 week schedule.
To look at past payperiods:
select start, end from payperiods where start = '$querydate';
Or just date
Ok, that makes sense. I have all the payperiods specified in a table to
begin with, then just query selecting all >= start && <= end.
Thanks,
- Darren
On Tue, 2002-11-12 at 11:29, Peter Beckman wrote:
> Put the dates for employees into one table.
>
> In another, put the payperiods.
>
> You cou
This is probably off topic..I hope someone can help.
How do I go about distributing a php program (collection, scripts, whatever) under the
GPL?
Thank you for any help you may give in pointing me in the right direction.
M.Cortes
Fort LeBoeuf School District
--
PHP Database Mailing List
Hi All,
Need a little help with something.
I've created a Search Engine Tracking tool that allows me to measure ROI
from users that comes form search engines using specific keywords..
My problem is I forgot to capture a multiple of different "identifies"
that tell me where the keyword is.
T
put it inside a preg_split where you say that [?KR] in the brackets are the
possible identifiers, and the brackets are required. that should work.
i.e $chunks = preg_split( "/[?KR]/", $string[query]);
THis would also work with split.
Something like that might work for ya
hth
Jeff
SourceForge.net and freshmeat.net both offer Free hosting of Open-source,
GPL software. SF.net also offers CVS services for keeping revisions
centralized. Both offer the ability to host tarballs of your collections,
scripts and other useful stuff. I know on SF.net you can create one
project "Cor
I have several thumbnail images spread out in my website. I thought it
would be cool to write a single PHP script so that when they click on the
thumbnail, the name of the larger pic would be passed to a PHP script that
displays it on its own page...I don't even care about a link back, they can
j
The link for your image:
Click Here
The code for displaypage.php
blah...
"
?>
Something like this should be all you'll need. A little more HTML here and
there should help you position and size your image.
Hope this helps.
Rich
> -Original Message-
>
I am attempting to create a form of system names that is populated
from a database query. The database query is working fine, and the form
population is actually working fine also. The question I have is about
organizing the variables that result from the form. I want to use the
system n
"; ?>
Your input box should be the following:
The $ isn't necessary in the HTML code since HTML doesn't really recognize
this as a variable. When the form is passed to the action page, the code in
the action page (in this case PHP) creates a variable named whatever the
On another topic...Does MySQL handle record locking and prevent multiple
open edits by different users?
"Maxim Maletsky" <[EMAIL PROTECTED]> wrote in message
news:20021112130532.1DE5.MAXIM@;php.net...
>
> Risks are to share properly the data. You can never rely on the accuracy
> of data in the fla
Hi everyone,
I'm creating a sample site for a company that does aircraft sales. I use a
MySQL DB to store all the info of the available aircraft. Now, I would like
to store pictures directly inside that same table, so that on the "details"
page, it would provide a picture out of (for example) Fiel
As you'll probably see in a lot of responses, it might be better to store
the pictures in a folder on the server and store only the path to the
pictures in the db. That keeps the size of the db smaller.
If you choose to do that, use an HTML form with
enctype="multipart/form-data" and an input typ
not sure i understand why you would need to use a php script for this? why
not just use a static html tag, if all you're doing is opening the
picture in a new window?
-jon
-Original Message-
From: Brett Lathrope [mailto:brett@;lathrope.com]
Sent: Tuesday, November 12, 2002 1:44 PM
To: [E
> On another topic...Does MySQL handle record locking and prevent
multiple
> open edits by different users?
Yes.
---John Holmes...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
yes, you need to insert the date as -mm-dd. you can go around this and
still have the user see a form field with mm/dd/ but you need to break
each part down, and play with the string functions so the final mysql query
is in -mm-dd.
-jon
-Original Message-
From: Paul Ihrig [mai
> I have several thumbnail images spread out in my website. I thought
it
> would be cool to write a single PHP script so that when they click on
the
> thumbnail, the name of the larger pic would be passed to a PHP script
that
> displays it on its own page...I don't even care about a link back,
the
Want to give the user the ability to download a dynamic Access.mdb file that has a
table and linked report formatted for Avery 5160 labels. Know how to create all this
stuff in VBA code, but not using PHP.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.
Check the PHP-DB archives ;-)
http://news.php.net/article.php?group=php.db&article=22433
Hatem
- Original Message -
From: "Rich Hutchins" <[EMAIL PROTECTED]>
To: "Seabird" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, November 13, 2002 12:24 AM
Subject: RE: [PHP-DB] small data
You could do something as simple as this:
I think most browsers will convert the spaces in the link (when clicked) to '+' or
'%20', but this may not be true with some less popular browsers (i don't know).
Then displayPic.php might be something like this (if you have latest PHP version):
displ
If the last reply didn't help you, try this:
Another way to write, if you aren't worried about
Peter
On Tue, 12 Nov 2002, NIPP, SCOTT V (SBCSI) wrote:
> I am attempting to create a form of system names that is populated
> from a database query. The database query is working fine, and
On Tue, 12 Nov 2002, John A DAVIS wrote:
> Want to give the user the ability to download a dynamic Access.mdb file
> that has a table and linked report formatted for Avery 5160 labels. Know
> how to create all this stuff in VBA code, but not using PHP.
It is better to give too much information t
hello,
I am trying to connect mssql with php, when I use mssql_pconnect(), It
will fail to connect when the amount of visitors becomes large. But,
when I use mssql_connect(), I can only run SELECT quern, while the
INSERT/UPDATE staments doesn't work. Can somebody tell me why? thanks
and sorry fo
55 matches
Mail list logo