Well, it looks like your previous response was correct, but $a%$b in this
case returns 4, not the 0.8 as intended ... fmod($a, $b) (I have php 4.1.2,
so I can't test fmod()) will probably return 0.8 though.
As a side note, this message seems a little off-topic ... though it is PHP,
it has nothing
From: Dillon, John [EMAIL PROTECTED]
While doing a cross tabulation, I've got a query which gives me a variable
number of fields:
Maybe mysql_num_fields() and mysql_field_name() will be of use, here? Check
the manual..
---John Holmes...
--
PHP Database Mailing List (http://www.php.net/)
To
To answer my own question again, I didn't assign the returned value from the
function call to a variable:
$piv_result=queries();
All OK.
-Original Message-
From: Dillon, John [mailto:[EMAIL PROTECTED]
Sent: 14 August 2003 17:54
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Functions -
Dillon, John wrote:
One more bite on this code.
function queries(){
//code..
$piv_result=mysql_db_query($db, $query, $connection) or die (Query9
failed: $query);
return $piv_result;
}
function print(){
global $piv_result;
Hi!
Can somebody explain me what's the difference between PEAR::DB and the DBX extension
included in PHP?
Thanks
Juliano
Thanks to both responses. In fact, it decided to work once I put 0 in the
cell that 1 was to be added to! It seems it got it started.. 1+NULL=?
-Original Message-
From: Matt Schroebel [mailto:[EMAIL PROTECTED]
Sent: 13 August 2003 15:48
To: Dillon, John; [EMAIL PROTECTED]
Subject: RE:
Hi Everyone,
I'm just wondering whether we can use PHP to find out the name of user
who is currently logging on to local Windows computer and accessing a
particular .php web page.
Thanks in advance.
Hi all, i have a question, i have a php file with all my class to
connect into a postgresql db and i'm using the pg_connect in this form:
pg_connect(192.168.1.100$dbase);
but when i have 8 or 10 users inserting data the db response is very
slow, is problem in the pg_connect?, all ppl use the
Hi all!
I need to know how I must connect to MS SQL Server 2000 in a Win 2000 Server
from my Internet Server with Linux, PHP 4.0.4 + Apache 1.3.19.
Thanks for your help.
--
PEM Jean Fernando Ortiz Arana
Coordinador de TI
Centro Escolar El Roble
APDE - Guatemala
--
PHP Database Mailing List
Duhhh. me mike. me like cumputors.
This is where the honest geek admits his mistakes.
I had a do while loop such as
do {
mysql_query ($qupdate, $link);
$rslterror=mysql_error($link);
$number++
} while ($rslterror!=null);
I was trying to insert a new record with
Jeff --
...and then Jeff said...
%
% One last question.
%
% I changed all the DB values where numbers are used - (varchar - int)
Well, you should only change for those where the numbers are numbers...
%
% But for the well locations, there are dashes in them, I.E. 10-15-065-22
Exactly.
%
I try to learn file uploading in PHP. I've successfully uploaded a file
onto my server. I use move_uploaded_file(tmp_dir/tmp_filename,
destination_dir/filename) to move the temp file. The thing is that I
have to do a chmod 777 destination_dir in order to move the file. Is
this bad for
On Tuesday, August 5, 2003, at 05:56 PM, Merlin wrote:
Hi there,
I am wondering if this could be done with mysql and without php, just
with
sql.
I do have a table with text and another one with pictures.
Now I would like to print out all titles and mark those tests
containing a
picture with a
-Original Message-
From: Jeff [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 05, 2003 3:52 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] MySQL Returns Error
Oops, my mistake, it's not a blank entry - it re enters the
last entry.
I can hit F5 or click refresh 1000 times
Try:
$sql = select * from item where \bib#\ = 300;
- Original Message -
From: Jeremy Peterson [EMAIL PROTECTED]
To: PHP DB [EMAIL PROTECTED]
Sent: Wednesday, August 06, 2003 4:34 AM
Subject: [PHP-DB] Sybase Query- Problems with Pound Sign
I am having a problem with a query that has
Yes duh...
I didn't realize numbers weren't considered characters.
What's the sql entry for numeric characters?
I'm new at this, and figure I'm not doing to bad so far. .
John W. Holmes [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Jeff wrote:
kwo VARCHAR(10) NOT NULL,
lsd
Here's some functions I use in my development which save on connect and
query calls for me.
//General Purpose Utilities.
//db_connect connects to the database server and selects the proper
database.
//Arguments: None
//Returns: Nothing
function db_connect() {
Ok. Special thanks to Robert Twitty for the answer. I started using the TEXT
datatype to achieve long texts of data. However, PHP.INI is configured by
default to limit TEXT datatype retrievals to 4K. Change the mssql.textlimit
in the INI file to suit your purposes, and use the TEXT datatype.
Dear Evan,
It depends what you send in your SQL statement ($sqlstmt), as far as i know
Interbase need only commit-statements depending on your I-Base server
setting AUTO-COMMIT=Tue/False. And only then when you send UPDATE queries.
For SELECT statements you dont need a COMMIT. But beware that you
The Palace of King of Ogoni Kingdom,
Ogoni Oil producing community,
Rivers State Nigeria.
Dear Sir,
I am Princess Grace , daughter of HRH King Solomon
Abonime, the king of Ogoni Kingdom. I am 25 years old
and a graduate of Mass Communication.
My father was the king of Ogoni Kingdom
As of Version 4.0.1, MySQL can also perform boolean full-text searches
I am running Mysql 3.x . This sounds like a simple task to me. Is it
not
implemented in 3.x?
It does not have to be OR, NOR or anything, just AND
I've never tried it, but you might be able to get away with
SELECT columns FROM
Jeff wrote:
Yes duh...
I didn't realize numbers weren't considered characters.
What's the sql entry for numeric characters?
I'm new at this, and figure I'm not doing to bad so far. .
Make them an INT column. It'll hold numbers up to 2 billion+. Or you can
use TINYINT which will hold numbers up
I am having a problem with a query that has a pound sign in it. The
results are quite puzzling, it seems like the page doesn't load if the
query is present. I have tested this on other tables without the pound
sign and they work beautifully, seems like the pound sign is the
troublemaker to
Read: http://www.mysql.com/products/licensing-examples.html
===
Richard [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hello
I hope this is a rumour but I heard that MySQL is now fully GPL which it
wasn't earlier.
I think the part used to communicate with the mysql
I think you may already have this, but just another 20 pesos
SELECT Unit, COUNT(Unit) [Quantity]
FROM table
GROUP BY Unit
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 8:52 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject:
Hi all, after look and evaluate the options that all you kindly recommended, I decide
to use the free version of Maguma, it has several
capabilities that makes good, with a bit disadvantages but I think is pretty good.
Another option is php edit, but unfortunately is not yet available a formal
The left join works the same for two or more tables.
select * from table1
left join table2 on table1.id=table2.id
left join table3 on table1.id=table3.id
...
Just specify the table you want to join and what to use to join them.
On Tuesday, August 12, 2003, at 03:16 PM, Michael Cortes wrote:
I
I would recommend changing them all to .php files. If you ever change
hosts, or servers you might not be able to change them, also it could be
less secure too
==
Dennis Cole @ Sanford Weather - Sanford, MI, USA -
Well, as one of the last posts said, if you are displaying in a web
browser, via HTML, you need to insert br tags where you want the text to
go to the next line. HTML doesn't respond to /r/n pairs. So if that is
how the user types them in (with a enter key at the end of lines) you need
to
I have a problem with some programs, I am using 4 frames, 3 of them are for
input data, the top frame is using for input information (right now only
alow show existing information), in the middle frame appear information and
with the bottom frame it's possible navigate through the records, I
begin 666 empresa01.zip
[EMAIL PROTECTED])[EMAIL PROTECTED]'[EMAIL PROTECTED]F5S83 Q+G-Q;.1=
MZ8[.)+^;Z#?@@!UC903NL^9K _F!)3R;(DJBDIW948H+OKNDUX*-1MAN8
M)^KG\1MM!(,Z\K!=M1=06L,V,RF64AGG%P=9?V'5O]J?RF;VP_O/['\\[O?
MF;*?WCT%_C+MA\^?OHK\QQG%3HKUPM6;A RQO+K3]?_N/YX\U=V\^[WVYN/
[EMAIL
Robert Twitty wrote:
Unless I am mistaken, but isn't there an ODBC driver available for MySQL
called MyODBC?
-- bob
I haven't a clue. Ill look, maybe it will help me create drivers for my
DB layer, as I already know MySQL.
Last night I successfully connected to IBM's DB2, but I didnt get far
On Wednesday 06 August 2003 01:14, Jeff wrote:
Well I did what you said, and now I get Parse error: parse error,
unexpected T_ECHO in C:\FoxServ\www\encana_db.php on line 44
Try:
$result = mysql_query($query, $link_id) OR die(mysql_error());
--
Jason Wong - Gremlins Associates -
I've been using JSP for some time now, and thought I'd write a couple of
rdbms explorers (flat tables, simple master/detail paradigm) using other
technologies, like PHP, Cocoon, etc. Well...it's been fun. I have more
working than not. But now I am hung up. I am getting wierd results in a php
You guys thanks for the encouragement.
I finally solved it with this:
?php $text= preg_replace(/(\015\012)|(\015)|(\012)/,nbsp;br /,
$rsDailynewsDetail-Fields('newsfull')); echo $text; ?
Help came of course from the link Holmes gave.
Thanks.
Budelak wrote:
Yes. Itis with enter key. It will not
SELECT DISTINCT(Unit) from TABLE_NAME;
[EMAIL PROTECTED]
Darn, here's the link:
http://www.mysql.com/articles/wizard/print_version.html
-Original Message-
From: Dillon, John
Sent: 11 August 2003 19:09
To: [EMAIL PROTECTED]
Subject: Pivot tables
Here is the worth-reading mysql answer to my question below. Pity it's
implemented on perl not
There's probably a better way to do this, but to retrieve only the 0.8 from
24/5 try this:
($a/$b)-floor($a/$b)
Regards,
Matt.
-Original Message-
From: Alain Barthélemy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 12, 2003 5:05 AM
To: php-db
Subject: [PHP-DB] % operator
Hello,
If
..but even if I can get the names and number of fields during 'run-time',
how do I make the following statement applicable to a variable number of
fields:
while(list($a,$b...)= mysql_fetch_array($result))
or is there another way to extract which would work?
John
-Original Message-
From: Michelle Whelan [EMAIL PROTECTED]
Does anyone know what field type to use for inserting a webpage name into
a database? Example pagename.html
When I fill in the form information everything seems to insert fine, then
I do a search to see the result and nothing is there, so I check the
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] says...
I am using the Konqueror browser and browing to http://localhost/my.php
Howerver, the script I wrote, doing various queries and lookups, inserts,
etc.. takes a while to complete. That is fine with me. I'll wait.
However,
This SQL is generated by my script...
INSERT INTO cbs_eps ( eps_id , eps_name , eps_num , eps_air_date )
VALUES ( '5','No Hiding Place','5','1974-01-10');
'eps_id' is generated from the index ($x) of the array loop
the others are retrieved from the tab delimted text file
When run from
On Tuesday 12 August 2003 10:39 am, Phil Driscoll wrote:
The modulus is the remainder after division hence 5 into 24 goes 3 times
with a remainder of 4,
oops - 4 times with a remainder of 4 :(
--
Phil Driscoll
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit:
Hi Guys. Is it possible to specify a sybase timeout with the current stable
version of php? I am using --with-sybase (dblib) compiled against sybase
OCS.
Thanks
Mills
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I have a table, wth many entries.
Each entry has been asigned a unit to belong to.
I want to list all the units dynamically.
How can I display all the units, without displaying each instance of the
unit?
EG:
Unititem
breakfast cereal
breakfast
Wendall Williams wrote:
If the client has no entries for that category, it
needs to move on to the next category.
Yes, see mysql_num_row($result). That function will return the number
of rows in the result set.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit:
I do get results for islands in greece as well. How can I specify in my
statement, that both words have to be present?
From the MySQL manual:
As of Version 4.0.1, MySQL can also perform boolean full-text searches
using the IN BOOLEAN MODE modifier.
mysql SELECT * FROM articles WHERE MATCH
Hi There,
Yeah.. it was a copy paste
Trying again:
$threadQuery = db_query(SELECT id,type,colourID FROM kcs_threads
WHERE id=.escapeValue($typeResult[id]));
for ($i=0;$threadResult = db_fetch($threadQuery);$i++) {
echo $threadResult[colourID]. .$i;
}
Output:
223 0
225 0
301 0
On Wednesday 06 August 2003 13:41, Evan Morris wrote:
Basically, I want to know if it is possible to make PHP aware of
Interbase/Firebird *without* recompiling PHP.
It depends on how you've installed PHP. If it was installed from a distro's
RPM then maybe there's no need to recompile -- ask
As of Version 4.0.1, MySQL can also perform boolean full-text searches
I am running Mysql 3.x . This sounds like a simple task to me. Is it not
implemented in 3.x?
It does not have to be OR, NOR or anything, just AND
merlin
Larry E . Ullman [EMAIL PROTECTED] schrieb im Newsbeitrag
Shaun, the MySQL manual suggests that you have hit your limit using the
VARCHAR field type (255 characters). To store 6,000 characters have you not
considered using the TEXT field type?
6.2.3.1 The CHAR and VARCHAR Types
The CHAR and VARCHAR types are similar, but differ in the way they are
personally, i had luck with the statement below, but have sent it to others
in the past and they had varying results. but give this a shot at the top
of your page that your PHP code is running on.
mssql_query(set textsize 65536);
hth
Jeff
What is the best way to parse through a non-repeting XML output using php?
- Rick
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Morten Twellmann wrote:
Hello,
I got the following error message from MySQL:
---
Query failed.
MySQL said:
Unknown column 'AGE' in 'where clause'
query = SELECT *, (Year(Now()) - Year(BDAY)) +
((DAYOFYEAR(Now())-DAYOFYEAR(BDAY))/365) as AGE FROM Katalog WHERE AGE = 31
AND AGE = 50 AND
Larry E.Ullman wrote:
Im looking at venturing into working with PHP's ODBC extention.
Does anyone have any recommendations as to a Database, that is easy to
understand/get into from a novice point of view, that installs on
windows 2k,
and is free?
MySQL is kind of free, installs on W2K and is
-Original Message-
From: Jeff [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 05, 2003 3:15 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] MySQL Returns Error
Every time I access or refresh the page, it adds one blank
entry to the DB.
Maybe I have the insert query in the
Hello,
I'm trying to get the values from a form post with multiple checkboxes
checked . Here is what I have,
if ($row = mysql_fetch_array($result));
do {
input type=checkbox name=class_id[] value=$row[class_id] $row[name]
}while ($row = mysql_fetch_array($result));
HI
I'm having a problem using some php
functions in LINUX machines. I'm trying the "header" function to
redirect my visitiors to a specific page i want to generate the
pages dynamically , using arguments (For ex.
posgreSQL
-Original Message-
From: Richard [mailto:[EMAIL PROTECTED]
Sent: Monday, August 11, 2003 1:49 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL and PHP?
Hello
I hope this is a rumour but I heard that MySQL is now fully GPL which it
wasn't earlier.
I think the part used to
This mail is probably spam. The original message has been attached
along with this report, so you can recognize or block similar unwanted
mail in future. See http://spamassassin.org/tag/ for more details.
Content preview: The Palace of King of Ogoni Kingdom, Ogoni Oil
producing community,
SELECT Unit,COUNT(Unit) as quantity FROM TABLE GROUP BY Unit
-- Oscar Satorre Pérez [EMAIL PROTECTED] --
- Mensaje Original -
Remitente: [EMAIL PROTECTED]
Destinatario: [EMAIL PROTECTED]
Fecha: Jueves, Agosto 7, 2003 3:52pm
Asunto: Re: [PHP-DB] Breaking down a table field
This worked great. I am keeping a table of available PINs for each of my
groups of students. I rewrote the code to get a random number from the
table and if if it updates the student successfully, it deletes the number
from the availables table.
Thanks a lot!
On Monday 11 August 2003 03:09
Dillon, John wrote:
OK, please ignore, I believe I've found the answer in the manual notes:
$query=your SQL;
$result=mysql_query($query) or die(Query ($query) sucks!);
$fields=mysql_num_fields($result);
echo table\ntr;
for ($i=0; $i mysql_num_fields($result); $i++) //Table Header
Calculate the
Dillon, John mailto:[EMAIL PROTECTED] wrote on Wednesday, August
13, 2003 10:24 AM:
How do you add a number to a field within the query, ie
without having to
extract? Eg
$query=UPDATE Choice SET visits=(visits+1) WHERE ID='$thisID';
is the above visits=(visits+1) legal, cos it doesn't
Most likely its not a PHP issue, but looking to see if anyone has run
into this.
I've inserted a serialized string, into a CLOB column.
Trying to retrieve the column returns no results.
If anyone has any DB2 experience, I'd be grateful if I can bounce a few
questions to you
offlist.
Thanks for
Thanks. I couldn't find the correct syntax in my resources. I tried at one
point to use commas like:
select * from table1
left join table2,table3 on table1.id=table2.id,table1.id=table3.id
Thanks again for the correct syntax.
On Tuesday 12 August 2003 04:00 pm, Brent Baisley wrote:
The left
Hi everyone,
I try to learn file uploading in PHP. I've successfully uploaded a file
onto my server. I use move_uploaded_file(tmp_dir/tmp_filename,
destination_dir/filename) to move the temp file. The thing is that I
have to do a chmod 777 destination_dir in order to move the file. Is
I believe this is only applicable to fields of type text. It may have
no effect on varchar(255) fields. The purpose of this statement is to
limit the amount of memory allocated by the driver for text data. If it is
not specified, the driver will try to allocate 2GB of memory. The
extension sets
Hi fellowes,
I am working on a full text search in php and mysql. It workes pretty good,
with one exception.
If two words are entered, I do get results for each words in seperate as
well.
Examle:
carribean islands
I do get results for islands in greece as well. How can I specify in my
I started playing with DB2 earlier this week.
And come to find out that it creates table names/columns in UPPER case.
Does anyone have any experience using DB2 in a cross platform manner,
with other dbs such as MySQL?
Just looking for ideas, as I've run out of them...
Thanks
--
PHP Database
OK, now I am really sure it has to do with the vars I defined from my text
file...
Once I have the text file open, I'm looping through it...
// pull RETURN off the end
$trimmed = rtrim($lines[$x]);
// Pull apart array element
list($strDate,$strNum,$strName) = explode (\t, $trimmed);
//
I do have an auto_increment for the record id. But that is just a way for me
to uniquely id the record. Student numbers, barcodes, etc can change.
The reason I am using the do/while loop is: Every student is getting a
4digit pin for library, cafeteria and network access. It has to be
This would happens ifyou have defined the data type of the columns as char or varchar.
---Original Message---
From: Aaron Wolski
Date: Viernes, 08 de Agosto de 2003 08:51:04 a.m.
To: 'Jeff'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Sorting issue
Seeing code might help us.
Aaron
Yes, songs do span shows. However, the list of songs for each weeks
show starts out as a *.asc (same a *.txt) space-separated file. This
gets uploaded via a PHP file that formats each row and inserts it into
the database. That's why even though I know there will be duplication
it appears (to
The easiest way would probably be to use the fmod function.
http://us3.php.net/manual/en/function.fmod.php
Andrew.
At 11:43 AM 8/12/2003, Matthew Moldvan wrote:
There's probably a better way to do this, but to retrieve only the 0.8 from
24/5 try this:
($a/$b)-floor($a/$b)
Regards,
Matt.
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] says...
I have been writing my queries like this...
$link = mysql_connect ($host, $username, $password);
$query = insert into $table ('joe', 15);
if ( mysql_db_query($dbname, $query, $link)) { }
But then I was reading
I'm trying (Firebird 1.5 RC4 PHP 4.3.1 Mdk 9.1.)
Get the PHP source from http://www.php.net/downloads.php
untar it:
tar xvfz php-*.tar.gz
cd to the untared base dir:
cd php-4*
according to http://bugs.php.net/bug.php?id=23928
add #define ISC_FAR in php_interbase.h
export LIBS=-lstdc++ -lcrypt
begin 666 formfill.zip
[EMAIL PROTECTED])`-*!R\H$P'/[EMAIL PROTECTED]0!```49F]R;69I;PO86-E'1A
MBYG:69S]W2SL$PT8^!E.,+ \/___R^7.SZ=;7A_K/SM_OQ7.]*;6YXNJG^
MQ:XIZM'R_Q?3#7Y=XTF]O]QC[M*\U*EVIEKI4J7Q1/!\+N9-(9_C$P,
M('B3Q96$091!AT0!V0G`^M#A0*7D,QY:O6K94;=BHQ'CI7L#%.RL=ETUN
From: Jason Lange [EMAIL PROTECTED]
Here's my question. I'm creating a website for a weekly radio show. One
of the items I would like to store in the database is the list of songs
played in each show (there's normally between 20-25 songs per show), and
the songs will be displayed by show.
Yes. Itis with enter key. It will not be possible to pre-determine the
length as this field is supposed to be a news field.
I'm lost as to how to go about this as the enter key does not generate
chr(13) when saving. I'm really lost.
Holmes directed me to http://us2.php.net/nl2br. I'm
While doing a cross tabulation, I've got a query which gives me a variable
number of fields:
$query=SELECT Dept;
$count=count($piv_cos);
for($x=0;$x$count;$x++){
$query.=, SUM(IF(Co='$piv_cos[$x]',Exps175,0)) AS '$piv_cos[$x]';
}
$query.= FROM $tbl1 GROUP BY Dept;
I have been writing my queries like this...
$link = mysql_connect ($host, $username, $password);
$query = insert into $table ('joe', 15);
if ( mysql_db_query($dbname, $query, $link)){ }
But then I was reading that I should use mysl_query instead of mysql_db_query.
But I
in php,mysql_seek can move the pointer, but you have no way to know where
the pointer locates currently.
i think some function should be added in the future version, like
mysql_getPointerPosition($rs) which returns a int as the position in
resultset. so it's would be easy to implements some
One more bite on this code.
function queries(){
//code..
$piv_result=mysql_db_query($db, $query, $connection) or die (Query9
failed: $query);
return $piv_result;
}
function print(){
global $piv_result;
$count_fields=mysql_num_fields($piv_result);
Budelak wrote:
Hello,
Can someone help with this problem I've been trying to solve but don't
how to.
I have a field of type longtext that contains text with paragraphs at
the time of entry.
But when I display this text content, the paragraphs are not shown.
Everything will just appear in one
From: Matt Babineau [EMAIL PROTECTED]
For some reason my MySQL doesn't seem to be caching queries!
And you expect PHP to solve this how? Do you want PHP to cache the queries?
You must say please...
You need to set the four variables mentioned at the following URL in your
my.cnf file.
My word, easy when you know how...!
Cheers mate!!!
[EMAIL PROTECTED]
07/08/2003 14:42
To: [EMAIL PROTECTED]
cc: [EMAIL PROTECTED]
Subject:Re: [PHP-DB] Breaking down a table field
SELECT DISTINCT(Unit) from TABLE_NAME;
From: Matt Babineau [EMAIL PROTECTED]
Got an interesting problem! I have a list of ID's, basically things
people have viewed on my website. When I pull the viewable items from my
database, I need to be able to filter out all the ID's people have
already viewed, so that they only get a list of
The % is called the Modulus operator. It is very briefly explained in the PHP
manual in table 11-2.
In your example, $mod = $a % $b == $mod = 0.8
It is a very easy operator to use.
Doug
On Tue, 12 Aug 2003 11:04:39 +0200, Alain Barthélemy wrote:
Hello,
If you have
$a = 24;
$b = 5;
and
Here is what I have for a layout:
thing_id - it is a hash value (md5())
I have a user session variable that is an array thing_id's that were
viewed.
So each time the user click a like to view a thing_id, I note that in a
session variable, so when they go back to the home page, all the things
Jeremy Peterson wrote:
I am having a problem with a query that has a pound sign in it. The
results are quite puzzling, it seems like the page doesn't load if the
query is present. I have tested this on other tables without the pound
sign and they work beautifully, seems like the pound sign
So create a hidden input field on the page called cur_id and set its value
to the id of the record being displayed. If no record is currently being
displayed, set it to -1.
When you get ready to handle the form data, check the $_POST['cur_id']
variable. If it's set to -1, perform an INSERT. If
Dillon, John wrote:
..but even if I can get the names and number of fields during 'run-time',
how do I make the following statement applicable to a variable number of
fields:
while(list($a,$b...)= mysql_fetch_array($result))
or is there another way to extract which would work?
$num_fields =
I have a 1400 line text file. TAB delimited.
1974-01-13 8 Cold Storage
3 fields. nothing large or complicated.
I massaged the data to be in this format thinking it would make the import
easier.
I can open the file and drop it into an array just fine.
I can EXPLODE each array item into
Hello Everyone,
Here's my question. I'm creating a website for a weekly radio show. One
of the items I would like to store in the database is the list of songs
played in each show (there's normally between 20-25 songs per show), and
the songs will be displayed by show. Should I put all of the
In article [EMAIL PROTECTED], [EMAIL PROTECTED]
says...
Hello Mark,
I have tryed it by splitting the file into pices and then insert it with the
help of phpmyadmin. This woked.
however, I do have some more files to upload, and this seems to be not the
fastest way:-)
I tryed this:
Gerard Samuel wrote:
Most likely its not a PHP issue, but looking to see if anyone has run
into this.
I've inserted a serialized string, into a CLOB column.
Trying to retrieve the column returns no results.
If anyone has any DB2 experience, I'd be grateful if I can bounce a
few questions to
if i understand your question. why not take a different approach. when the
form is submitted do your updates/inserts and then forward the page with
the header() function to another page, even if it is the same page, but
with a different set of variables set on the page, the idea being to remove
On 11 August 2003 07:02, Michael Cortes wrote:
I am using the Konqueror browser and browing to
http://localhost/my.php
Howerver, the script I wrote, doing various queries and lookups,
inserts, etc.. takes a while to complete. That is fine with
me. I'll wait. However, the server
best way to tell is to place .'or die(mysql_error())' after any call to
mysql_query() to see what mysql is complaining about. personally I
sometimes declare the query first so i can echo that as well after the
msyql_error() function, so i can see the query that has just been
excecuted.
1 - 100 of 152 matches
Mail list logo