Salut,
te-am vazut in lista PHP si m-am gandit ca poate m-ai putea ajuta intr-o problema.
interoghez o baza de date si extrag anumite campuri pe care le asez intr-o pagina.
Vreau ca in functie de valorile existente si selectate de catre user sa reinteroghez
baza de date si in cadrul "aceleasi pag
How do you know if fails? What does mysql_error() say?
---John Holmes...
> -Original Message-
> From: Thoenen, Peter Mr. EPS
> [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 26, 2002 10:13 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] query fails with mysql_query but success wit
I'm a newbie of PHP and MySQL. Would anyone tell me that how to lock and
unlock a record of MySQL from PHP? And how other can detect whether this
record is locked or not?
Thanks for your help.
Regards,
Michael Wai
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: htt
I'm a newbie of PHP and MySQL. Would anyone tell me that how to lock and
unlock a record of MySQL from PHP? And how other can detect whether this
record is locked or not?
Thanks for your help.
Regards,
Michael Wai
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http
Hello everybody,
This command fails when ran with mysql_query but succeeds when ran command
line. Have verified connection good... a simple mysql_query("SELECT * FROM
{$user}_tickets"); returns true. Any ideas?
$query=mysql_query("
SELECT *, UNIX_TIMESTAMP(date_submitted)
Hi,
Friday, September 27, 2002, 10:20:32 AM, you wrote:
SM> Thanks to Micah Ive resolved my old problem, but now im working on something new
and fairly gnarly...i ahve a data entry form and one of the textareas on the form
needs to have the ability to
SM> take a table...from users who dont know
Thanks to Micah Ive resolved my old problem, but now im working on something new and
fairly gnarly...i ahve a data entry form and one of the textareas on the form needs to
have the ability to take a table...from users who dont know html. does anyone know any
possible solutions to this dilemma?
Thanks for your help. As i said im quite new to php so all your help in
simplifying my code has been appeciated.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Leif,
You may want to look over the system I am creating. It is for
neurobiology, but it uses categories. The URL
is http://brancusi.usc.edu/bkms
I am using both trees and colors.
Regarding your specific problem, you have to have an indexing table, which
will make the necessary relations between
I'm trying to create a system to store virtual "objects". Each object
will be in a category, and the categories may be in other categories.
The categorie list might look something like:
Food
Candy
Healthy Food
Vegeterian food
Organic food
Gross food
I'm thinking of
Hi,
Im using a form that updates a database entry. In it one of my fields is a drop
down/list field. Whenever the value in this field is changed, instead of updating it
to the new item, it is deleted entirely. I have the same field in my entry page that
inserts just fine, but for some reason t
John Holmes pointed out to me that I had made a stupid error by starting my
variable names with a number. Cardinal no-no. I know better. Really.
That solved the parse error. Another error popped up after that stating that
the variable $levelones was not a valid resource whenever I tried to
manipu
Try single-quotes instead of double (' instead of "). Could be an
interpolation issue.
--Dave
On Thu, 26 Sep 2002, Hutchins, Richard wrote:
> Can somebody tell me what I might be doing wrong in the code below? I'm
> trying to use a function to perform an often-used db query and return the
> re
You can't start variables with a number.
---John Holmes...
- Original Message -
From: "Hutchins, Richard" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 26, 2002 4:18 PM
Subject: [PHP-DB] Return Array from Function
> Can somebody tell me what I might be doing wro
Sorry, line 51 is the one that reads:
$1contentID=$row["1contentID"];
> -Original Message-
> From: Hutchins, Richard [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 26, 2002 4:19 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Return Array from Function
>
>
> Can
Can somebody tell me what I might be doing wrong in the code below? I'm
trying to use a function to perform an often-used db query and return the
resulting resource to the calling script. I keep getting this error though:
Parse error: parse error, unexpected T_LNUMBER, expecting T_VARIABLE or '$'
You're right, thanks.
>Shouldn't it be [0-9] for each of the elements, also?
***
Wilmar Pérez
Network Administrator
Library System
Tel: ++57(4)2105145
Hi there everyone,
How can I import binary data - say from a gif file, into a string or array in PHP? I
can do text files/csv etc . but using the same method it won't do binary (I'm sure
for some obvious reason).
Thanks for your help
Chris
heyyy i got the solution for this !!(after spending whole
day...)
in my code, javascript was not accepting the statement :
document.subj_frm.chk_id[i].checked=true
cos in php script i was using :
i changed the javascript code to :
var max = document.forms[0].elements.length ;
Hi,
I don't know if I'm right at this list.
I have installed the mysql server on my debian Linux Server and it runs
perfectly if I'm connecting it from my Puretec Webspace. But if I'm
connecting from Apache with PHP4 running on localhost with the same script
it won't run but no Error are logged
On Thu, 26 Sep 2002 11:39:40 -0500
"Wilmar Perez" <[EMAIL PROTECTED]> wrote:
> Hello guys
>
> I know this should be asked in another list but don't want to subcribe just
> for a simple question. I apologise in advance if that bothers anyone.
>
> I'm trying to check valid IPs that come from a
Shouldn't it be [0-9] for each of the elements, also?
What if I want to put 123.012.123.123 or something similar?
---John Holmes...
> -Original Message-
> From: Wilmar Perez [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 26, 2002 12:40 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-
Take out those + in your regular expression and it works fine for me,
for any format.
---John Holmes...
> -Original Message-
> From: Wilmar Perez [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 26, 2002 12:40 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Valid IP
>
> Hello guys
Try this:
function padIP($ip){
$ar = explode(".",$ip);
$ip = "";
$xt = "";
for ($i = 0; $imailto:[EMAIL PROTECTED]]
Sent: Thursday, September 26, 2002 10:40 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Valid IP
Hello guys
I know this should be asked in another list but don't want to subc
Check your register_globals value in your PHP.INI!!
Dan
On Thursday, September 26, 2002, at 11:48 AM, [EMAIL PROTECTED] wrote:
> I'm using PHP4.2.2 Win with MySQL 3.2.52 Win and PHP doesn't pass vars
> from
> 1 php to the other how i fix it?
>
> Thanks
>
>
>
> --
> PHP Database Mailing List
On Thu, 26 Sep 2002 19:48:31 +0300
"Thomas \"omega\" Henning" <[EMAIL PROTECTED]> wrote:
> I'm using PHP4.2.2 Win with MySQL 3.2.52 Win and PHP doesn't pass vars from
> 1 php to the other how i fix it?
Read the documentation, register_globals is SET to off by default.
http://www.php.net/manual/e
What's you register_globals set to?
> -Original Message-
> From: Thomas "omega" Henning [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 26, 2002 12:49 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Need help urgent!!
>
>
> I'm using PHP4.2.2 Win with MySQL 3.2.52 Win and PHP does
Do you mean passing vars between forms, between functions, or between includes?
<>< Ryan
-Original Message-
From: Thomas "omega" Henning [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 26, 2002 10:49 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Need help urgent!!
I'm using PHP4.2.2
I'm using PHP4.2.2 Win with MySQL 3.2.52 Win and PHP doesn't pass vars from
1 php to the other how i fix it?
Thanks
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hello guys
I know this should be asked in another list but don't want to subcribe just
for a simple question. I apologise in advance if that bothers anyone.
I'm trying to check valid IPs that come from a form filled by a user so I'm
using the following:
function valid_ip($ip)
{
//Check wheth
> Is there a mysql or array variable for the current row of a query
array?
> I want to alternate background colours for each row of the query
output so
> i
> need to know the current row number.
There is a way with SQL variables, but you're better off just letting
PHP keep track of it.
---John H
You can use & instead of %, and it may be quicker.
$rowNum = 0;
while ( $row = mysql_fetch_array($result) )
{
$bgcolor = ($rowNum++ & 1) ? "#EADBC6" : "#EFE1CE";
...
---John Holmes...
> -Original Message-
> From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED]]
> Sent: Thursd
> -Original Message-
> From: Patrick Lebon [mailto:[EMAIL PROTECTED]]
> Sent: 26 September 2002 16:20
>
> This is how im currently doing it...
>
> $rowNum = 0;
> while ( $row = mysql_fetch_array($result) )
> {
> $rowNum++;
> if ($rowNum % 2) { $bgCol = "#EADBC6"; } else { $bgCol = "
> -Original Message-
> From: Griffiths, Daniel [mailto:[EMAIL PROTECTED]]
> Sent: 26 September 2002 16:09
>
> as long as that same session code is present at the top of
> all the included files that are put in later. basicaly you
> need to put the session code in every page (even if yo
Last I checked there was no way to retrieve the current index into the result
array, you can set the index manually with mysql_seek_data(), but I don't think
that is what you want, so the best solution IMHO, is to do what you are doing
and manually keep track of the index.
-Brad
Patrick Lebon wro
then add an extra conditional to check if $i is equal to 0, or start $ off as
1so,
for ($i=1, $i<$num_rows+1; $i++)
-or-
if ($i==0)
//treat as even
either way woudl work.
-Brad
"Hutchins, Richard" wrote:
> Not sure here, but you might also run into a problem if you start your if
> statement wit
Thanks, im currently doing something similar to this but I was wondering if
there was an already defined variable that i could use rather then have to
create a value and increment it myself. I guess am being picky, but was just
curious as im new to php.
This is how im currently doing it...
$row
Not sure here, but you might also run into a problem if you start your if
statement with $i=0. If PHP does not treat the value 0 as even or odd, your
first row is most likely going to be purple along with your second row. I
know it's nitpicky, but I could see myself spending half an hour trying to
why not
if (!($1%2))
{
echo "even!";
}
else
{
echo "odd!";
}
Adam
On Thu, 26 Sep 2002, Brad Bonkoski wrote:
> oops...
>
> I meant:
> (if $i is odd)
> ...
>
> because $i would be the current index in the array.
>
>
> Brad Bonkoski wrote:
>
> > why not this?
> >
> > $result = mys
oops...
I meant:
(if $i is odd)
...
because $i would be the current index in the array.
Brad Bonkoski wrote:
> why not this?
>
> $result = mysql_query("Select * from table');
> $num_rows = mysql_num_rows($rows);
>
> for ($i=0; $i<$num_rows, $i++)
> {
> $row = mysql_fetch_array($result);
>
as long as that same session code is present at the top of all the included files that
are put in later. basicaly you need to put the session code in every page (even if
you only intend use it as an include) you wish to protect otherwise its contents can
be read by directly typing in the url i
why not this?
$result = mysql_query("Select * from table');
$num_rows = mysql_num_rows($rows);
for ($i=0; $i<$num_rows, $i++)
{
$row = mysql_fetch_array($result);
if ($num_rows is odd)
{
print $row with BG color of red;
}
else
{
printf $row with BG color o
Is there a mysql or array variable for the current row of a query array?
I want to alternate background colours for each row of the query output so i
need to know the current row number.
Thanks
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.
Can't you get around this by making the session code a separate,
required file that is at the beginning of every protected page? I think
this is basically the same thing, just making sure because I am about to try
and implement some session controls myself. Thanks.
-Original Message
make sure that the test code is in every page you wish to protect, even the included
ones, if its not there someone could still get the contents simply be typing in the
url of 'other.php' should they guess it etc, better to be safe than sorry
-Original Message-
From: Steve Bradwell [mai
I dont know if this is the right list.
I have installed the php-mysql package and can now connect to the database.
There is however error which I do not undertand.
Warning: No MySQL-Link resource supplied in
/usr/local/www/vantweststamps/databaselogin.php on line 15
Connected successfully
,Line
Thanks a lot for your help, but just a not to anuyone else who tries
this. Since there's no ()s around
UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(your_column)
, it thinks that you're trying to get:
UNIX_TIMESTAMP(NOW()) - (UNIX_TIMESTAMP(your_column) /60)
Instead of:
(UNIX_TIMESTAMP(NOW()) - U
If you include the other page AFTER you do this check you'll be fine. So run
your if statement and then add an else...include "other.php";
HTH,
Steve.
-Original Message-
From: Rodrigo [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 26, 2002 9:38 AM
To: PHP
Subject: [PHP-DB] Session
Hi people,
if i use this code:
logging in again or contact
the
mailto:[EMAIL PROTECTED]";>system administrator');
}
?>
in one page to check if the user is logged, and in this same page i include another
page, do i have to put this same test in this page that i
SELECT UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(your_column) / 60 AS
Minutes FROM your_table
---John Holmes...
> -Original Message-
> From: Leif K-Brooks [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 26, 2002 12:29 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Caculating minutes
I need a way to calculate the number of minutes since the value of a
DATETIME column in mysql. Any ideas? Thanks.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
> Hi All
>
> I know how to open, read & write to files using Php.
>
> But how can you write some content to a particular place in a file, Not
> the start or end but say the middle some where.
>
> Example:
>
> Basic html file
>
>
>
>
>
>
>
> Write my stuff here!!!
>
>
>
>
> This eventua
hi everyone,
I am new to all php and mySQL.
What i am trying to do is to obtain information from the db using 3 conditions.
this is what i've got
$sql_num = mysql_query("SELECT * FROM siteinfo WHERE dive_operator = '1' AND status =
'1'",$db) or die (mysql_error());
the 3 conditions i need is
53 matches
Mail list logo