at the top of the page..
i assume MYSQL DB. you must establish $link_id first connect to your DB then
run.
remember if u use this code a function, remember $HTTP is not global by
default.
$browser = $HTTP_SERVER_VARS["HTTP_USER_AGENT"];
$sql = "INSERT INTO table (useragent_name) VALUES
Hi,
I try to display the result of a mysql request but first element misses !
here is my code:
$sql->Query("select marque, reference from base );
$sql->afficheResultatRequete($sql->result,$sql->nbreChamps);
function Query ($query) {
$this->result = @mysql_query($query, $this->id) or MyS
Hi there,
Im currently working on a teaching system for the Uni of Vienna. I have a
problem though. We have over 2000 sound files (mp3s) of phrases and words.
But students are having problems playing them because of different
configuration setups.
At the moment they need flash for certain tasks,
Hi!
I am currently working on a shop system, which works with flashmx and php
and uses a mysql-database to read the path of the protected mp3s and so the
mp3s are passed to the flashmovie through php using the file-functions. The
shop also reads out the directories and parses the xml-output of the
Can somebody please tell me why the $displayThese variable in the code
snippet below only gets populated with the last value in the $newsList array
even when $newsList has more than one row of data?
while($newsList = mysql_fetch_array($result_getNews)){
if(
I'm looking for a mysql select statement that does the
following:
- Check if the value of each expert.id on the table
experts matches a value expt.id in the table
apliexpert.
- For those values where this is true check whether
the softID value for that row matches the variable
$softId.
- return th
> Can somebody please tell me why the $displayThese variable in the code
> snippet below only gets populated with the last value in the
> $newsList array
> even when $newsList has more than one row of data?
>
> while($newsList = mysql_fetch_array($result_getNews)){
>
I would say use JavaScript to gather the information (screen resolution,
browser info, etc) and then store it in a MySQL or similar DB using PHP. Do
a search for JavaScript and PHP variables to find out how (it involves
populating hidden fields with JS and passing to PHP Scripts AFAIK) ... that
sh
This will work except for those browsers with javascript turned off -
I've seen php examples of how to do this in books, (capture the user
agent anyway, then once captured - just plop it in the db) there should
be some on line somewhere.
Also if you have access to the web server, I think most w
J,
Try this (it assumes that the softid you want to search for is in the
variable $softid):
$sql = "SELECT Expert.*
FROM Expert
LEFT JOIN Apliexpert ON Expert.id = Apliexpert.exptid
WHERE Apliexpert.softid = '$softid'
ORDER BY Expert.Name";
--
Hey,
Just something easy, using a MySQL database, I don't know how to convert
Binary to a image file to be placed into html.
Could someone please help.
Thanks
Dallas Freeman
Rich,
Thanks! You pointed me in the right direction and I now have the code
working and returning the expected results. If anybody's interested, just
post back to the list and I'll post the working code. Don't want to bog the
list down if nobody cares.
Rich
> -Original Message-
> From: R
personally, i think solutions are always worthwhile, no matter how trivial.
that way when someone is searching the archives, they will find the
solution in the thread.
just my $.02
Jeff
I am creating a results page for completed and uncompleted procedures. I am
repeating a lot of the code and wonder if there is an easier way to do this.
$neh="select * from pro_list, complete_pro where pro_list.pro_name
='Neurological Exam/History'
and complete_pro.proid=pro_list.proid
and complet
OK, so here's the solution I came up with. A little harder to read here than
in an editor, but it's as clean and tight as I could make it. I use it as
the body of a function that returns $displayThese to a script uses the
newsID values to display those news items that have not expired AND the user
Really have to apologize. I tested the previous code too hastily before I
posted it, and additional testing after I posted it proved that it broke
with multiple items marked as read. Here is the fixed code. Hopefully I've
plugged the holes. Sorry for any inconvenience to anybody actually paying
att
There is some information you can from the browser, and some you
cannot. Check out
http://www.php.net/manual/en/reserved.variables.php#reserved.variables.server
for stuff the server is/can be aware of. Beyond that info, you'd have
to use something client side, like JavaScript. For those users that
We've been working on a news section for our site which allows us to find
news stories -> dump them in a mysql db, list the summaries in a page and
then link to a full version of the story.
The bit i'm having trouble with is how to list the results so we can set up
multi pages of content and link
Mike,
If you check www.phpclasses.org, and search for "paging" there's a paging
class built by pierre-yves lemaire that might do just what you're looking
for. It's pretty highly rated by the users of the site.
I also know this question has been asked in the past so a stroll through the
archives m
Hi there. here ya go.
$array_of_exams = Array();
$array_of_exams['Full Head'] = 'Head Examination History';
$array_of_exams['Full Body'] = 'Body Examination History';
$array_of_exams['Full Butt'] = 'Butt Examination History';
$exam_dates = Array();
foreach ($array_of_exams as $exam => $description
Hi!,
Do you have other ideas about how do it?
I thinking do :
1. Save the report in a
MMDD// tree directory
structure.
2. Save in the database the information about the report, and the path
to the page directory.
3. When the user request a report I go to the path and
Thanks that works like a charm and I learned some tricks that I can apply to
some other code!!! Ozzie
Hi there. here ya go.
$array_of_exams = Array();
$array_of_exams['Full Head'] = 'Head Examination History';
$array_of_exams['Full Body'] = 'Body Examination History';
$array_of_exams['Full Butt'
I was wondering if anyone was using a good store that was open sourced in
php.
Marie O
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Mine :)
Aaron
-Original Message-
From: Marie Osypian [mailto:[EMAIL PROTECTED]
Sent: March 6, 2003 2:53 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Store
I was wondering if anyone was using a good store that was open sourced
in
php.
Marie O
--
PHP Database Mailing List (http://www.p
I want to take away two times stored in the format "00:00:00" in a mysql
database, i retrieve the times and take them away by using the following
$total = $time1 - $time2 ;
when i echo the total it is a whole number of the hours.. and does not take
the minutes into account, anyone have an ide
$foo = split(":",$time1);
$bar = split(":",$time2);
$time1 = mktime($foo[0],$foo[1],$foo[2],1,1,1980);
$time2 = mktime($bar[0],$bar[1],$bar[2],1,1,1980);
$total = $time1 - $time2;
That will give you the difference in seconds between the two.
I'll let you convert it to hh:mm:ss.
Peter
On Thu,
> I want to take away two times stored in the format "00:00:00" in a mysql
> database, i retrieve the times and take them away by using the following
>
> $total = $time1 - $time2 ;
>
> when i echo the total it is a whole number of the hours.. and does not
take
> the minutes into account, anyone hav
I need to retrieve the last n records of a table, n will probably be 2
or 3. I know that I can accomplish this by: select * from table order
by field DESC Limit n, but i would prefer not to do this way because it
interferes with my sorting mechanism on the main page. Is there any
other way to do
(Using MySQL and PHP)
I need to only return a row from table1 if its id is not found in table2.
The query below is how I think it should work. However (as I had imagined),
this doesn't work. Syntax error (you can't put a select inside a select like
that).
SELECT table1.id FROM table1 WHERE table1
I guess I am confused, how does one query effect a query that you have in
an other part of the page? The two queries are not related. The second thing
I am confused on is: Do you want the last n records that were added to the
table or do you want the last n records in a given index?
Jim
---
Please ignore my previous email, I figured out how.
Thanks anyways.
-Original Message-
From: Dallas Freeman [mailto:[EMAIL PROTECTED]
Sent: Friday, 7 March 2003 1:51 AM
To: '[EMAIL PROTECTED]'
Subject: images - BINARY -> HTML
Hey,
Just something easy, using a MySQL databa
I am saving some data to a text file and what I want to do is have each
line of data collected to be on its own line.
What I am collecting is a roster (no, name, grade) so there is 10-15
people on a roster, and now when it saves it saves to one line.
Thanks
Ryan
--
PHP Database Mailing Li
I need the last n records when, say user_id = 3. So it returns all rows where
user_id = 3, then, on top of that I need only the n most recently entered
records. The problem with the sorting mechanism I have existing is essentially
that those last n rows need to be sorted ASC or DESC by every fie
If it were me I would tackle this in two parts. First create a SQL statement
that returns the data you want, you say you can do this so the first part is
already finished. Then stuff the data into an array and when you go to
display the data to the user, that is when you sort it into the chosen sor
on 3/6/03 4:59 PM, Katie Evans-Young at [EMAIL PROTECTED] appended the
following bits to my mbox:
> I need to only return a row from table1 if its id is not found in table2.
> The query below is how I think it should work. However (as I had imagined),
> this doesn't work. Syntax error (you can't p
[EMAIL PROTECTED] (Ryan Holowaychuk) writes:
> I am saving some data to a text file and what I want to do is have each
> line of data collected to be on its own line.
>
> What I am collecting is a roster (no, name, grade) so there is 10-15
> people on a roster, and now when it saves it saves t
OK, I would like to do it with the method you suggested. However, I'm
having a few problems. Firstly, I can't seem to figure out how to sort
rows returned from mysql_fetch_array. sort() or any other array
function won't work because each row is an array, and I need to sort by
the column. Se
I am currently running on a Windows Box the OS is ME
I have installed apache 2.0.44 and I have downloaded the newest PHP download
for windows.
I have read the configuration manual repeatedly for getting the php into the
apache httpd.conf doc file. but I still cannot get php to be recognized.
Can a
I am trying to upload an image to my webserver. This is the PHP page that
is called from my html page. I am trying to upload the image to my folder
called "logos" the direct link would be: C:\Program Files\Apache
Group\Apache2\htdocs\logos I am not sure what I am doing wrong in the code
below.
Sir,
I am working on PHP and PostgreSQL.
I want to insert output of my Query in textfile.
so how to open file and insert data one by one in textfile.
please help me.
Ramesh Patel
[EMAIL PROTECTED]
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/un
Hi all,
Permit to recive your valuable knowledege :)
I would like to know that what good does Persist connection to a database
do i.e,
1. Will it increse the performance (My DB and Apache are on same Machine)
2. Can a pErsist connection be Broken after the job has been done as we have
32 limite
On Friday 07 March 2003 13:59, Ramesh PAtel wrote:
> I am working on PHP and PostgreSQL.
>
> I want to insert output of my Query in textfile.
> so how to open file and insert data one by one in textfile.
fwrite(), see manual for details and example.
--
Jason Wong -> Gremlins Associates -> www.
Why not use:
SELECT a.item_id, a.subtotal, a.quantity
FROM shopping_cart a, orders b
WHERE b.session_id = session_id()
AND b.customer_id = $customer_id
AND a.order_id = b.border_id
?
!Exclude Disclaimer!
Jonathan Villa wrote:
>I can't figure this query out.
>
>I want to pull data from
43 matches
Mail list logo