The problem is that he assigned a length to a TEXT field. You cannot do
that.
-Original Message-
From: George Pitcher [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 08, 2002 3:13 AM
To: [EMAIL PROTECTED]; Lisi
Subject: Re: [PHP-DB] Error creating new table
You can't have NOT NULL assig
fopen()
fwrite()
fclose()
-Original Message-
From: Raymond [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 08, 2002 12:05 PM
To: Frank Flynn; [EMAIL PROTECTED]
Subject: [PHP-DB] Re: Making a txt file from db data, is it possible?
Hi!
Ok, I think I maybe have to explain this a little bet
I had a typo:
$sql = "UPDATE $table_name SET file_name=\"$files\"";
-Original Message-----
From: Rick Emery [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 12:29 PM
To: 'Jas'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Stuck on db entry from select box.
jas,
Ya didn't do what I told you to do. Now, do this:
";
$sql = "UPDATE $table_name SET file_name=\$files\"";
-Original Message-
From: Jas [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 12:01 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Stuck on db entry from select box...
O
Using VALUES() is faster
Nothing really wrong with SET clause, though
-Original Message-
From: Zach Curtis [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 10:34 AM
To: Rick Emery; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Insert, Arrays, & Null
Terrific! I tried an exa
ailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 9:29 AM
To: Rick Emery; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Insert, Arrays, & Null
The data being read dynamically into the array could contain values which
are NULL (the default) or numeric (if a numeric value exits). However, the
query i
When you say "...account for either a numeric or NULL value ...", do you
mean SELECT a value that could be NULL?
If so, the query is "SELECT * FROM mytable WHERE cusa IS NULL || cusa >= 0"
-Original Message-
From: Zach Curtis [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 9:11
$post = ereg_replace("(.*) ","\\1", $old_post);
If you want to search mysql for this that is something else
-Original Message-
From: Dave Carrera [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 04, 2002 10:29 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Please help count ?
Hi All
I
Jason,
If you don't have one, I would also recommend a good book that combines PHP
and MYSQL interaction. I would strongly suggest the one I cut my PHP teeth
on:
PHP Essentials by Julie Meloni
-Original Message-
From: Julie Meloni [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 04, 20
change:
$Location_Info = mysql_fetch_row($result);
to:
$row = mysql_fetch_array($result);
$Location_Info = $row['fieldname'];
replace "fieldname" with the real name of your database field
-Original Message-
From: Jason Tobias [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 04, 2002 9:2
cron is an application/utility on ALL unix servers. It is used to execute
ANY unix command or script at specified dates, times, etc.
type the following to learn more:
man cron
man ctrontab
your cron job would execute the command to translate the dbase file to sql.
Then execute mysql to read in t
Josh,
Your question is too vague to answer.
Do you know mysql?
Do you know PHP or PERL?
If not, learn these, then ask.
If so, create code, then ask
-Original Message-
From: Evans, Josh [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 04, 2002 9:31 AM
To: [EMAIL PROTECTED]
Subject: [PHP-
]]
Sent: Thursday, April 04, 2002 8:41 AM
To: Rick Emery
Subject: RE: [PHP-DB] Database Sorting by date
The query fails when I try to look at a month it says "Query Failed"
>Ronald L. Allen (MCSE NT, MCP, CCNA)
SR. LAN/WAN Administrator
>SFOR - Hungary, Croatia
>[EMAIL
Can you use a cron (Unix) or at (Windows) job to dump the dbase data to a
comma-separated-value table? Then suck up the csv into the mysql databasde.
-Original Message-
From: Marij Bellen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 04, 2002 8:37 AM
To: '[EMAIL PROTECTED]'
Cc: '[EMA
Ron,
What problem are you having? I'm looking at your code, and it's so clean, I
could eat off of it.
My only suggestion would be that $month will NEVER == "NULL". If you are
testing for NULL, the test is:
if ($month == NULL )
Second, $month will be assigned a value, so it will never be NULL e
12:51 AM
To: Rick Emery
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Submitting Dynamic Form
Ah, I just knew there must be an easy way of doing it. Thanks Rick !
Is there a good reference on stuff like this with some examples ?
Am I pushing the friendship ? :-)
Rick Emery wrote
il 03, 2002 4:37 PM
To: Rick Emery
Subject: Re: help sorting by a column name
Oh thats teh statement that gets the number for this statement:
while ($info = mysql_fetch_row($max)) {
printf ("Hardware Reviews - %s Articles
Total", $info["0"]);
}
and prints the total number of a
you just cross-posted this to the mysql mailing list.
is this a mysql issue or PHP issue?
-Original Message-
From: Alex Behrens [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 4:33 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] sorting by colum name with nested loops
Hey Guys,
) construct to extract each key and value.
So then you just walk through the array and process each entry.
-Original Message-
From: Chris MacKenzie [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 8:47 AM
To: Rick Emery
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Submitting Dynamic
what happened when you extracted the form field names from the DB?
-Original Message-
From: Chris MacKenzie [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 3:13 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Submitting Dynamic Form
Hi All,
I'm pretty new to the whole php thing a
show your code
-Original Message-
From: Ron Allen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 5:43 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Problem with the beginning variable
I have a problem with the inital load of my page
When it loads it says that the variable is n
what command are you using?
When posting questions, give all details...wee can't read your mind
-Original Message-
From: Daniel Broome [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 9:33 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] autoincrement
I am trying to add auto increment
select PERIOD_DIFF(DATE_FORMAT("2002-04-01","%Y%m"),
DATE_FORMAT("2001-0801","%Y%m") ) as dd;
+--+
| dd |
+--+
|8 |
+--+
1 row in set (0.00 sec)
-Original Message-
From: John Hughes [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 02, 2002 2:28 AM
To: [EMAIL PROTECTED]
S
while( $row = mysql_fetch_array($result) )
{
}
-Original Message-
From: Natividad Castro [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 29, 2002 2:59 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] end of file
Hi to all,
how can I handle when the recordset reach the last record?
is it possib
SELECT * FROM mytable ORDER BY some_field DESC LIMIT 1;
-Original Message-
From: Ron [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 29, 2002 7:39 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Return the last record on database
My database has several records an ID is the primary key
I wan
Jason, this is intriguing.
Please show us a bit more code before the mysql_query() call.
-Original Message-
From: Jason [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 1:54 AM
To: Php-Db
Subject: [PHP-DB] MySQL/PHP Update
I'm trying to update my MySQL database, but it doesn't
did you start each include file with:
If not, PHP treats the code within as straight text
-Original Message-
From: Brad Melendy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 5:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] include() statement hell!
Ok, I've spent some time
show you code and db table struct
-Original Message-
From: Dave Carrera [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 2:38 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Very wierd problem ;-(
Hi All
I will try and explain as clearly as I can
I have a message board typ
You need to ensure that mysql.sock has the correct read-write-execute
permissions
Check the mail list archives; this question is asked and answered EVERY week
-Original Message-
From: Liam Gibbs [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 1:17 PM
To: [EMAIL PROTECTED]
Sub
I'm trying to decipher:
when I select the record to edit the drop-downlist has
the first option as the value instead of what the corresponding
StateID in
the column reads. How can I correct this? The form to insert and
edit have
the below code and correctly in
I suggest subscribing to the mysql mailing list and asking the question.
[EMAIL PROTECTED]
-Original Message-
From: Chris Payne [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 7:47 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] procedures?
Hi there,
Where can I find information in
?
thanks for the help so far,
andres
- Original Message -
From: "Rick Emery" <[EMAIL PROTECTED]>
To: "Andr?s Felipe Hern?ndez" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, March 25, 2002 12:03 PM
Subject: RE: [PHP-DB] delete statement que
First: what error are you getting?
Second, make your code more readable and easier to debug:
$query = "INSERT INTO usuario (USU_USUARIO, USU_CLAVE, USU_NOMBRE,
USU_EMPRESA, USU_DIRECCION, USU_TELEFONO, USU_CIUDAD, USU_DEPARTAMENTO,
USU_PAIS, USU_EMAIL, USU_REPCLAVE, USU_TIPCLIENTE)".
VALUES ('$C
this solution will not work for mysql databases, as mysql does not support
sub-selects
-Original Message-
From: Bill Morrow [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 2:02 PM
To: Andr?s Felipe Hern?ndez
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] delete statement question
O
if you are using mysql 4.x, you might try:
DELETE answers FROM exam e, questions q, answers a WHERE
a.question_id=q.question_id && q.exam_id=e.exam_id;
I've not tested this, though.
-Original Message-
From: Andrés Felipe Hernández [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002
There's a bunch of ways to accomplish what you request. Therefore, I'll
offer what I would do. Other folks, more brilliant than, will provide
better ideas.
1. Do you have access to the mail server? For instance, I run qmail on my
SOHO system and, therefore, have full sys-admin rights. If yo
$query = "SELECT myvalue FROM mytable WHERE some_condition";
$result = mysql_query($query) or die("Error: ".mysql_error());
$srch = "";
while( list($myvalue) = mysql_fetch_array($result)
{
$srch .= "$myvalue, ";
}
$srch = substr($srch, 0, -2);
$query = "SELECT * FROM other_table WHERE this
tables already, users and
adressreg
???
/ljungan
"Rick Emery" <[EMAIL PROTECTED]> skrev i meddelandet
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> store and validate a username and password with each user's info
>
> -Original Message-
> From:
store and validate a username and password with each user's info
-Original Message-
From: Ljungan [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 11:07 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] "marking" DB entries...
Im making an adressbook using PHP and mySQL.
I want each use
First: cross-posting to multiple lists...not nice. Most PHP folks are on
both lists.
Second: your first sentence seems to indicate that unknowledgeable people
inhabit the PHP list, vice the PHP-DB list. H
Third: what error do you get when you get the parsing error?
-Original Messa
I mean:
mysql_insert_id()
-Original Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2002 2:28 PM
To: 'Morten Nielsen'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] LAST_INSERT_ID()
use mysql_last_id()
-Original Message-
From: Mort
use mysql_last_id()
-Original Message-
From: Morten Nielsen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2002 2:30 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] LAST_INSERT_ID()
Hi,
In the PHP manual under the function mysql_insert_id() function they have
the following line:
The
SELECT * FROM mytable WHERE record_name REGEXP "^[a-h]"
-Original Message-
From: Jordan Elver [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2002 6:05 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Selecting Alphabetically
Hi,
Could anyone point me in the right direction with this one
Huh
-Original Message-
From: Ron [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2002 9:30 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: Relational database
But can you do that in PHP before you pull info from it
--
PHP Database Mailing List (http://www.php.net/)
To unsubs
What do you mean "last record in a table"? What are you REALLY trying to do
here? Do you want the last entry made according to a specific criteria?
-Original Message-
From: Ron [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2002 9:20 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re:
first, it helps if you show us your REAL code. The query statement you
showed below would obviously not work (it's missing the "mysql_query" part.
Second, when executing mysql_query() ALWAYS include the "or
die(mysql_error())" part to aid diagnostics.
Third, your query could not possibly work at
if( strcmp($date,"-00-00") )
{ do something}
-Original Message-
From: its me [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 14, 2002 12:16 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] date problem
i have an input field in a form that accept date called $date and in databse
i made it
SELECT DISTINCT city FROM addresses;
-Original Message-
From: Kevin Diffily [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 13, 2002 1:05 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] SQL Question
Hello,
I have a simple SQL Question. I would like to take the column city in
database add
MySQL does not currently support sub-selects.
The manual says:
DELETE [LOW_PRIORITY | QUICK] FROM table_name
[WHERE where_definition]
[ORDER BY ...]
[LIMIT rows]
Did you review the manual first?
-Original Message-
From: Riccardi Moreno [mailto:[EMAIL PROTECTED]]
Sent: Wednes
Vieliecht:
SELECT kat_id,immo_id FROM immo_kat WHERE immo_id=318 &&(kat_id = '1' OR
kat_id = '35' OR kat_id = '34') ORDER BY immo_id;
-Original Message-
From: Michael Plies [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 11, 2002 4:01 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] how can i jo
First: show us your exact query
Second: show us your exact error response
Third: show us your exact code and table structure
-Original Message-
From: Sander Peters [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 11, 2002 3:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] select rows from m
I tried the HAVING clause. it fails. This requires sub-selects or multiple
tables
-Original Message-
From: DL Neil [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 20, 2002 10:27 AM
To: Jonathan Underfoot; Rick Emery; [PHP-DB]
Subject: Re: [PHP-DB] SQL
Jonathan,
The original
First, what do you mean by "regs"?
If I understand your question, you want to know if mysql will re-use an old
auto_increment value that has been deleted. The answer is yes and no.
If you say: DELETE FROM mytable;
then the next insertion will cause the auto_increment value to begin at 1
If you
it works for me. What do your data and table structures look like?
-Original Message-
From: Fredrik Wahlberg [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 19, 2002 4:55 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] mysql LIMIT and ORDER BY problem
I have a strange problem with LIMIT.
How could you possibly have such a condition exist? That is, what relation
do the counts have to the contents of the name field?
What ARE you trying to really accomplish?
-Original Message-
From: Jonathan Underfoot [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 19, 2002 2:57 PM
To:
Huh
$query = "CREATE TABLE mytable (".
"field1 int,".
"field2 varchar(50),".
"field3 decimal(6,2),".
"field4 int,".
"field5 int )";
mysql_query($query) or die("Error: ".mysql_error());
-Original Message-
From: CrossWalkCentral [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 19, 2
Mate,
what code/function are you using to convert the dates?
what do your data look like in the table (structure, examples)?
-Original Message-
From: George Pitcher [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 19, 2002 8:01 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Problem displa
ent is not a valid MySQL result resource in
/var/www/html/HERONweb/home.php on line 32
I have 'echo mysql_errno();' just after the query is called but no number is
being displayed.
George
- Original Message -
From: "Rick Emery" <[EMAIL PROTECTED]>
To: "&
ng else
which is obvious?
George
- Original Message -----
From: "Rick Emery" <[EMAIL PROTECTED]>
To: "'George Pitcher'" <[EMAIL PROTECTED]>; "Rick Emery" <[EMAIL PROTECTED]>;
"Greg Donald" <[EMAIL PROTECTED]>; <[EMAIL
nt: Monday, February 18, 2002 8:48 AM
To: Rick Emery; Greg Donald; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Problem connecting to db on Linux
Rick,
I snipped the code from my windoze system. I did have to change the case of
the dbname to reflect the Linux version (all lc).
The error message I g
Have you spelled the name of the database correctly, including case
sensitivity?
What error message are you getting to indicate failure?
-Original Message-
From: George Pitcher [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 18, 2002 8:21 AM
To: Greg Donald; [EMAIL PROTECTED]
Subject:
Further, I recommend replacing your echos with the following:
echo "Type Of Car: "".
$myrow['car_type']."\n";
echo "Model Of Car: ".
$myrow['car_model']."\n";
echo "Year Of Car: ".
$myrow['car_year']."\n";
echo "Price Of Car: $".
$myrow['car_price'."\n";
echo "VIN Of Car: ".
$myrow['car_vin']
Your is inside your loop. So it is executed once to terminate the
table. After that, the browser just sees the rest as straight text.
-Original Message-
From: jas [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 2:35 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] formating w/ tab
Are you saying you got two different return values with the exact same input
values for $hour, $minute, $second, $month, $day, $year??
-Original Message-
From: Lerp [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 8:46 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Time Difference
Dave,
First, you need a "SELECT" tags.
print "";
$deloptions_sql = "select * from $tbn2";
$delresult = mysql_query($deloptions_sql, $con) or
die("error:".mysql_error());
while ($listdelrows = mysql_fetch_array($delresult) ){
$name2 = $listdelrows[name];
$id2 = $listdelrows[id]
addslashes() stripslashes()
Your question is vague...
-Original Message-
From: jas [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 14, 2002 1:32 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Form Validation
Anyone know of a good function to strip characters and stuff that would
cau
CORRECTION:
--
C:\>php -f a.php
02/14/2002 12:49:50 PM
-Original Message-
From: Lerp [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 14, 2002 12:45 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Time Question
Hi there. Got a bit of a snag. I'm migrating an ASP app to P
-Original Message-
From: Lerp [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 14, 2002 12:45 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Time Question
Hi there. Got a bit of a snag. I'm migrating an ASP app to PHP with a
mssql7.0 backend. The snag is this, I have a 'starttime' field
You can't do this using PHP, because PHP is server-side. You will need
JavaScript.
-Original Message-
From: jas [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 14, 2002 12:18 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Disable Right click w/ php?
I have been looking on php.net for a
change:
to:
note the semi-colon
-Original Message-
From: Dan Howard [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 2:34 PM
To: Rick Emery; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] undeclared variable error
Thanks Rick,
That took care of the $submit error, but I
Need to show us more code.
For instance: where is $srchrow set?
Next, change:
if ($submit){
to:
if (ISSET($submit)) {
Why are you over-writing $name, $details, $price, $imgloc with list() before
you even use them?
-Original Message-
From: Dave Carrera [mailto:[EMAIL PROTECTED]]
Sent:
try:
">
Also, please include a sample field value and the results of our tests
-Original Message-
From: Faye Keesic [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 12:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Passing form values with quotes, to itself
Hi there.
I hav
change:
if ($submit) {
to:
if (ISSET($submit)) {
-Original Message-
From: Dan Howard [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 12:21 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] undeclared variable error
Folks,
I am very new to PHP, and have been working through so
Why are you iterating through the array? Why not just:
$start_id = $row[0];
$end_id = $row[count($row)-1];
-Original Message-
From: David Fudge [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 11:40 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] First and La
session_start() does not take a parameter. Use:
session_start();
session_register($clothes);
-Original Message-
From: Renaldo De Silva [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 8:16 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Need help (displaying select data from an
Verify that $HTTP_REFERER is the URL the user was supposed to come from.
Somethig like (you may have to tweak it because I cannot test where I am
now):
if( strcmp($HTTP_REFERER,"www.mydomain.com/login.html") )
{
header("Location: http://www.mydomain.com/login.html";);
exit;
}
--
The question is: why use varchar? Why not use INT, then format to includes
commas when displaying?
-Original Message-
From: Mike [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 12, 2002 3:38 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] numeric string problem
Hi,
I am using VARCHAR fo
select * from tablename where field NOT LIKE "%A%";
-Original Message-
From: Dave Carrera [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 12, 2002 12:39 PM
To: php List
Subject: [PHP-DB] Select rows where ?
Hi All
How do I select the rows that DO NOT contain a certain character.
I.e
When you include $Select in your URL, did you remember to urlencode() it
first? If no, the spaces will blow your URL away...very nasty...
BTW, it helps if you post code.
-Original Message-
From: jeff akerman [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 11, 2002 4:27 PM
To: [EMAIL P
Re-read my previous email. You do not have mysql functionality compiled
into PHP and you web server. The clue is the phrase "undefined function:
mysql_connect()".
How did you load PHP, MYSQL, etc?
-Original Message-
From: Martin Allan Jensen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, Feb
FROM THE MANUAL:
mysql_fetch_row() fetches one row of data from the result associated with
the specified result identifier. The row is returned as an array. Each
result column is stored in an array offset, starting at offset 0.
Therefore:
print("$row[0]\n");
-Original Message-
From
What is the exact error you are getting?
I'm going to guess something along the lines of "unidentified function
mysql_connect()". If that's the case, that means you do not have mysql
functionality compiled into your web server.
Speaking of which: what is your Linux system (RedHat SuSe, etc)? W
sessions
-Original Message-
From: Renaldo De Silva [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 2:10 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] multiple query string
isn't there any other way?
Rick Emery wrote:
> cookies
>
> -Original Messa
cookies
-Original Message-
From: Renaldo De Silva [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 2:08 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] multiple query string
Help!
I'm designing a search page and I need to keep the search variable alive
even after i refresh the
ceil($myvalue)
-Original Message-
From: Renaldo De Silva [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 1:32 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Round a float to the next highest value despite the
value after the point
how can I round a float to the next highest valu
First, you don't have to write your own function to remove slashes. Simply
use:
$newline = stripslashes($oldline);
Second, write your lien containing slashes to the database. When you pull
it from the database, use stripslashes().
-Original Message-
From: Gary [mailto:[EMAIL PROTECTED]
Show us you table data
Show your PHP code as well
-Original Message-
From: Justin Hall [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 12:06 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] multiple entries in database
I have worked my problem down to the mysql database.
I have
You don't need to use var_dump. Just use the following statements:
$newquery = mysql_query("SELECT * FROM local_shows WHERE
show_date='$row[show_date]' AND venue='$row[venue]'");
print $newquery;
-Original Message-
From: Jonathan Underfoot [mailto:[EMAIL PROTECTED]]
Sent: Friday, Febru
First, the example you give will replace "is" with "," if "is" is the ONLY
work in the line. You indicate this with the ^$ construct.
Are you trying to replace only the first occurrence if "is"?
-Original Message-
From: Desikan [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002
If you are certain the format will ALWAYS be as you indicate, then try:
eregi("width=([0-9]*) height=([0-9]*)", $mystring, $reg);
$newstring = $reg[1]," x ".$reg[2];
NOTE: I don't have PHP here at work (I've got it at home). So you may have
to tweak this.
-Original Message-
From: Luke
You were close:
$mystr = substr($mystr, 0, -3);
-Original Message-
From: Renaldo De Silva [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 7:36 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Need to delete charcters from a string
This dosen't quite do what i need, this atual
$mystring = substr($mystring,0,-3);
> - Original Message -
> From: "Renaldo De Silva" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Thursday, February 07, 2002 8:56 PM
> Subject: [PHP-DB] Need to delete charcters from a string
>
>
>> I need to delete the las
ist from DuBoise, Zawodny, and others.
-Original Message-
From: paul wilczynski [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 5:42 AM
To: Rick Emery
Subject: Re: [PHP-DB] Can't get left join to work
Thank you! I'm obviously going to have to read up on that 'on
Yes, you can re-select from the same database without opeing a new
connection.
I recommend that you print the contents od $newquery to verify it contains
the string you think it should. Perhaps the apostrophes you've enclosed the
$row[] variable are not expanding.
-Original Message-
Fr
The following means you have not opened a link to your database.
Concerntrate your efforts there.
Warning: Supplied argument is not a valid MySQL-Link
resource in /var/www/html/list.php3 on line 26
-Original Message-
From: Ken Thompson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February
a database
>into a "menu page". And I would like to have two products beside
eachothers.
>So... is it possible to get two datarows in one:
>
>do {
>
>} while (mysql_fetch_array() );
>
>?? or is this a stupid way to do it?
>
>Reagrds Raymond
>- Ori
.
So... is it possible to get two datarows in one:
do {
} while (mysql_fetch_array() );
?? or is this a stupid way to do it?
Reagrds Raymond
----- Original Message -
From: "Rick Emery" <[EMAIL PROTECTED]>
To: "'Raymond Lilleodegard'" <[EMAIL PROTECTED]>
Ya haven't given us much to go on. So...
SELECT DISTINCT * FROM mytable WHERE ;
-Original Message-
From: Justin Hall [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 07, 2002 2:24 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] duplicate entries in db
I have a script that calls a functi
$str = substr($str,0,-3);
-Original Message-
From: Renaldo De Silva [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 07, 2002 1:57 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP-DB] Need to delete charcters from a string
I need to delete the last 3 character of a string, w
40.00
6902D 2002-03-0144.00
6902D 2002-03-0144.00
6902D 2002-03-01 800.00
6902D 2002-03-01 5.00
99996902D 2002-03-01 148.00
Q 2002-03-01 7.00
---
Rick Emery wrote ...
Show us your table structures and the data they contain.
It
1 - 100 of 346 matches
Mail list logo