Hi,,
no 3 sql isn't neccessary.
you could put an $i = 0 before the whlie loop and increment it at the end of
it.
Thus you could do it with an if.-caluse: if ($i=0) { ehco "ad"; }. Same
thing for
ads which go between newsarticle 8 and 9.
Good luck
otis
""Trond Erling Hundal"" <[EMAIL PROTECTED]
Hi,
I'm not quite sure but try to play a bit with the '".$row[...]."' part.
that looks too much. leave out the "" and/or the period.
good luck
Johannes
""Mick Lloyd"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
00c001c0b1ea$54a5f5c0$5c0083ca@oemcomputer">news:00c001c0b1ea$54a5f5c0$5c0083ca@oemc
Hi,
to do this you'd need to be a quite priviledged user.
in order to create users you'll need acces to the
user-table of mysql. not likely to be given to a "normal"
user. developing on your home pc, well...
you need GRANT to grant priviledges to any user.
also not likely to be given to a user.
Hi,
you could give them the possibility to do this via phpMyAdmin.
If you want to code it yourself search sites like
www.phpbuilder.com
www.devshed.com
www.zend.com
www.webmonkey.com
J
""Jim Ray"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
99ou8b$vmv$[EMAIL PROTECTED]">news:99ou8b$vmv$[EMAIL PR
Hi,
you can save it as .csv or as a tab-delimited .txt file.
then via "load data infile 'path/to/file' into table YourTable"
if you use windwos the "\" has to be escaped by another "\"
like this "C:\\path\\to\\file"
Johanens
""John"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
99ra37$dj8$[EMAIL
Hi,
hte first part after WHERE is the column name of your db.
if you want to search with name as a criteria you write:
selelct name, nickname from table where name=$name;
johannes
"Naga Sean" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I had a quest
Hi,
well usually yuto_increment is used on ID fields.
then depending on how many rows your table has
tinyint (up to 255; 1k), smallint (up to 65535; 2k)
mediumint (up to 16777215; 3k) int (up to 4294967295, 4k).
Johannes
"Ben Cairns" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
3AC2FA65@tech-01">
Hi,
take a look at
http://forums.devshed.com/showthread.php?threadid=12544&forumid=5
it might help.
"Mirko Cegledi" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi!
>
> I know its offtopic, but I don't want to join another mailinglist for this
> one q
Hi,
> $res = mysql_query ("SELECT COUNT(deptid) FROM maintenance GROUP BY
> deptid");
> $deptcount = array(); // reset the array
> while ($row = mysql_fetch_row ($res)) {
> $deptcount[] = $row[0];
this should be $deptcount[] .= $row[0]; shouldn't it?
> }
>
cheers
J
--
PHP Database Maili
Hi,
Micah Stevens wrote:
> Nope. Anytime you set an array with no index equal to something, (i.e.
> $deptcount[]) it will add another element to the end of the array.
>
> If you use .=, that means append the data, but since you're not
> specifying an element, I'm not sure what it would do. Per
Hi,
just install phpMyAdmin which has a feature to
duplicate tables structure only or structure and
data.
""McShen"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
9aak89$ruv$[EMAIL PROTECTED]">news:9aak89$ruv$[EMAIL PROTECTED]...
>
> how do i duplicate a table?
> i tried
> create table refer2 selec
Hi,
schrieb im Newsbeitrag
9aket9$i1t$[EMAIL PROTECTED]">news:9aket9$i1t$[EMAIL PROTECTED]...
Hi,
I'm a beginner in PHP dev, and i have find how to connect a DB and select a
TABLE. But i search a example to ahve the numbre of ligne in a rows on my
table.
my table is :
date
author
subject
con
Hi,
you can't have ANY output whatsoever before adding a
header. Even whitespaces before the opening schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> When ever i add headers in my pages i get the following errors
> Can anybody tell me what's wrong?
>
> Warning: Cannot add he
Hi,
just a theoretical question:
is it neccessary/useful/good to specify the
link_identifer for a query if I include an
ypplication file where the link is opened
in every file.
quote:
If link_identifier isn't specified, the last opened link is assumed.
If no link is open, the function tries to
Hi,
you could use an enum('yes','no') field instead of a char(1).
And then try to do instead of if (!empty($var)) something like
if ($var == "yes")...
jsut a thought..
Johannes
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional command
Hi,
it seems like there is an undefined index ;-)
post some line around l. 302 for further help.
Johannes
"Matt Coyne" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi all
>
> I am getting an error which I don't understand. It is:
>
> Warning: 0 is no
Hi,
is the query-line your line 35 or not?
for further debugging put a
if (! $result){ echo mysql_error(); } into
the script to see what errormsg you get.
Johannes
""Andrew Durk"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
9b9nad$9oi$[EMAIL PROTECTED]">news:9b9nad$9oi$[EMAIL PROTECTED]...
> I c
HI,
>
or any ohter form element.
Johannes
""Denis Mettler"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I got Data from my Database,
> but how can I show them in a textfiled within a html form?
> Any ideas?
>
> Thanks in advance.
>
> --
> B
Hi,
assuming you have unique passwords.
$result = mysql_query("SELECT COUNT(*) AS used FROM userTable WHERE
passowrd=$password");
$exists = mysql_fetch_object($result);
if ($exists->used) {
display error that pswd is already in use
}
If there is an entry in your DB with the password th
Hi,
could it be the setting of cookie_lifetime in your php.ini?
or the coolie_path?
just two thoughts
cheers
Johannes
""Lisa Elita"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
004f01c0c4df$1bd0e540$69fc2bca@hadinata">news:004f01c0c4df$1bd0e540$69fc2bca@hadinata...
> I tried to use cookies with
Hi,
you usually get the error if your query is wrong and
you try to call mysql_fetch_array in a while loop.
It's easier if you post the relevant lines of code but
I'd say there is something wrong with your query.
Johannes
""Klaus Haberkorn"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
9bh369$d
Hi,
which part is not working? Put a "or die(mysql_error())" behind your
queries to see which one produces an error.
like this: $result = mysql_query("SELECT * FROM ships ORDER BY ship",$db)
or die(mysql_error());
>
> while ($row = mysql_fetch_array($result)) {
>
> If ($result) {
>
Hi,
i don't get that.
Examlpe: tablename: test , entry: id 001; name: John Doe
$result = mysql_query("SELECT * FROM test");
$row = mysql_fetch_whatever($result); // everything ok
$result = mysql_query("SELECT * FROM tet");
$row = mysql_fetch_wahtever($result); // Warning: Supplied arggument is
Hi,
cookies are sent as header information. This means you can't send
any output (html-tag, whitespaces before schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> i've got error message when i put some session variables on my pagge:
>
> Warning: Cannot send session cookie - hea
Hi,
> $result2 = mysql_query("SELECT * FROM convicts WHERE ship =
> '$id' ORDER BY convict",$db);
> $row = mysql_fetch_array($result2) // ! you are missing a ";"
this is where you get the parse error from!
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe,
Hi,
check the relevant configure-flag for interbase.
most likely to be something like --with-interbase.
just type ./configure --help |more and you'll get
a lng list of options.
Johannes
<[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Quiero instalar
Hi,
you have output in line 42. any html stuff. You have to send haeder
information
before any output. If you capture the info via a form you can make a
seperate
capturing script (not $PHP_SELF) to enter the info into a DB and at the end
of this
-after successfully inserting the data- redirect th
how about posting the code? or describe
the problem a bit closer.
Johannes
"Rui Machado" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello
>
> I'm writting a registration form with connection to
> mysql DB, but I have a problem in the last step, I
>
Hi,
> $test = "The session data was transferred.";
> echo "Click this link: test2.php";
change this to test2.php";
you need to specify a variable name first behind the ?. It worked
for me on NS 4.75
Johannes
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [E
hi,
OCIExecute() executes a previously parsed statement. (see OCIParse(). The
optional mode allows you to specify the execution-mode (default is
OCI_COMMIT_ON_SUCCESS). If you don't want statements to be committed
automaticly specify OCI_DEFAULT as your mode.
hope it helps
Johannes
""Randal Pit
Hi,
> Does anybody know a solution? I am willing to show you my httpd.conf and
> php.ini if you like.
httpd.conf would be helpful. only the relevant stuff like AddTpye
application.
Johannes
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For add
Hi,
why storing the pictures in the db. just store the link to
it.
just a thought
Johannes
"Sharmad Naik" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
> I wanted to know how to store and retrive images like jpeg,bmp from
> database.I have a table
Hi,
let me get this right. What I understood is the following:
1. Your admin page where you enter the information of a company
2. A Page with a drop-down list where all the company names are listed.
(These names should then be linked to an information page with more
info?)
3. A page where new
Hi,
> This is the code that I have so far (please note, it is within a
> function)... any ideas of how I can make it work?
this arouses the assumption that is doesn't work. Did you get
errors? And could you supply more information about
your database relations especially about the one of
orders
So a certain company is previously selected? And then you want to
populate the form with the info of the company?
to do this link the menu with a onChange action to a display page.
But I'm not sure if I get the layout. Could you describe it again?
Cheers
Johannes
"Beckie Pack" <[EMAIL PROTECT
You can output the passed varibles from the previous page
in an in the form of the following page.
Johannes
"Brinzoi Constantin Aurelian" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi !
>
> Here is the problem: I got 8 pages, shown one after anoth
Hi,
>
> $sql4="select * from quicktimes, other_images, storyboards, where
> quicktimes.spot_id, other_images.spot_id, storyboards.spot_id =
> \"$spot_id\" order by date_posted desc";
>
this should be:
...WHERE quicktimes.spot_id = '$spot_id', other_images.spot_id = '$spot_id'
storyboards.spot_id
Hi,
well for the first question I have to admit that I was not able
to figure out what you mean.
But I can give you some thoughts on the second question.
the actual sending part could be done with a mail-class.
e.g. at http://phpclasses.upperdesign.com
the more tricky thing is about the password
Hi,
you could do the random selection in MysSQL if you use it
using a query like this.
SELECT FieldWithURL FROM YourTable ORDER BY RAND() LIMIT 0,1;
This will give you a random field. If you want more fields you have to
set different values for the limit. Like LIMIT 0,5 for the first 5 row.
Just
"refresh/reload".
>
> Thanks for your help.
>
> Max
> Indonesia
>
>
>
> - Original Message -
> From: "Johannes Janson" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, April 30, 2001 6:56 PM
> Subject: Re: [PHP-DB] Ho
Hi,
is there a function called mysql? You'll have to
use mysql_query. The syntax isn't correct either.
mysql_query("SELECT * FROM table" [, link identifier]);
Look in the manual for more detailed information.
hope it helps
Johannes
""martin helie"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
9c
Hi,
""martin helie"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
9cs791$mn3$[EMAIL PROTECTED]">news:9cs791$mn3$[EMAIL PROTECTED]...
[..]
>
> 1. There is such a function as "mysql" whose arguments are
> mysql("database","query",[resource id])
> very useful as it avoids having to call mysql_
Hi,
> Does anyone know some lib for generating excel files.
For which database? In MySQL you could do a LOAD DATA OUTFILE file.xls.
Johannes
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To con
Hi,
> I'm trying to get MySql type of a field (as string) into a php script.
sometime the answer is easier as you think:
mysql_field_type(link_identifier);
Johannes
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
Hi,
If you exactly know which row you want you could use LIMIT yourRow, 1.
If you copy the RS into an array first you would have to use a while
statement
aswell, or not?
Cheers
Johannes
""Mike"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
9b4e4n$gmh$[EMAIL PROTECTED]">news:9b4e4n$gmh$[EMAIL PROT
Hi,
> I have tried these if statements, but without luck:
>
> if ($Page='') { $Page="homepage" }
you use only one = So you assign "" or '' or null to $page.
use if ($page == "") instead.
hope it helps
Johannes
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAI
Hi,
> The following statement will not work:
>
> $sql = "select * from sometable t1, sometable t2 where t1.field1 =
> t2.field2";
do you get an error? It should work.
Johannes
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional comman
Hi,
> How can i import data from an access database to a mysql db.
>
you can export it to a tab-delimited file and then use
LOAD DATA INFILE 'yourfile.txt' into YourTable.
The table structure has to exist.
hope it helps
Johannes
--
PHP Database Mailing List (http://www.php.net/)
To unsubsc
Hi,
> How can I detect client's OS/platform with PHP? (Win, Mac, etc.)
with PHP_OS. $os = PHP_OS;
See "Chapter 8 - Constants" of the manual.
Johannes
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTEC
Yep, correct, it is incorrect.
sorry read to quickly over it.
Johannes
""Hoover, Josh"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
E973048AB322D411AE99009027E32DF685CC35@FRAZ">news:E973048AB322D411AE99009027E32DF685CC35@FRAZ...
> This advice is incorrect I believe. PHP_OS will return the OS PHP
I'm not sure but couldn't it really be that this is
due to the MySQL version? PHP is just passing
a string which is then executed by MySQL. I think
I recall having no problems with aliases. I don't quite
remember which version it was but I think it was 3.23.*.
> Now I am using a shareware version
Hi,
> How can I pick a random row?
SELECT * FROM table ORDER BY RAND() LIMIT 0, 1;
I'm not really sure but it worked with order by rand. Check
the manual on that if it doesn't work
hope it helps
Johannes
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTE
Hi,
>$sql2 = "SELECT ServiceDes FROM ServiceTypes WHERE ServiceID = $serviceid";
put single quotes around $serviceid.
>$service_type = mysql_result($sql2, 1);
I might be perpetuating the spreading of rumors but I've heard and read
somewhere
that mysql_query() is supposed to be better in the pe
Hi,
> Warning: MySQL Connection Failed: Unknown MySQL Server Host '0f2scom' (2)
in
> /web/sites/139/gamie/www.game-boy-advance.f2s.com/addartikel.php on line
22
> Unable toconnect to database
[...snip...]
> mysql_connect(db.game-boy-advance.f2s.com,*,**) or die("Unable
> toconnect to data
Hi,
> I normally work PHP/MySQL but now I have a customer that is adamant
> about keeping their data in an Access DB.
you could work around it by using an odbc connection from Access to MySQL.
So the administration is still done via Access but actually it is a MySQL
DB.
If you're interested see
Hi,
[...]
> Warning: Cannot add header information - headers already sent by (output
> started at /home/thesis/public_html/registro.php:2) in
> /home/thesis/public_html/registro.php on line 80
[...]
you can't have any output before calling header(). Output is any HTML or
even
whitespaces before
Hi,
[...]
> Warning: fopen("logs/993700800.log","w+") - Permission denied in
> /home/sites/site20/users/guide/web/counter.php on line 28
are you sure you have the rights to access the file?
> Warning: Supplied argument is not a valid File-Handle resource in
> /home/sites/site20/users/guide/web/
Hi,
[...]
>Now, if i hit enter again it will say:
>"Please fill out all fields to proceed.
>Sorry, username is already taken, please choose another.
>There seems to be a problem with the database."
So this is the problem?
[...]
>Here is my code:
>
Hi,
>1. I have checkbox NAME="x" on Page1.
>2. On page two I want to check ($x) if it's checked or not. How can I do
it.
>3. What value is stored in $x.
PHP makes a variable out of every form element. You don't need to do a
thing.
So assuming this is within and tags:
you can check on the act
Hi,
> hope anyone has an idea on how to fix this...
>
>
> OnClick="submit.php" class="button">
> class="button">
>
you could give the form one action and then check on the following page
wether $Submit or $Edit is set.
form.php
...
doit.php
http://www.php.net/)
To unsubscribe, e-mail: [E
Hi,
> Dear Experts
>
> When ever i try to run MySQL under linux it gives me following error
>
> ERROR 2002 : can't connect to local MYSQL server through socket
'/var/lib/mysql.sock' (111)
this is with PHP isn't it? can you log in the monitor and then type SHOW
VARIABLES. A long list
will be disp
Hi,
>I have seen in several places the following line:
>
>
>
>Will this tag work in both IE and Netscape?
>
>What does myScript.php do? Does it find an image and pass the binary data
back?
sorry if this is not really answering your question. I'd think about storing
only the path
to the image i
Hi,
> I have a form and based off of this form if my user selects option a then
I
> want them to be redirected to another page. If they select option B then I
> want to continue with my php scrips as it does now.
>
> Does any one have any ideas on how I can accomplish this?
use the header() func
Hi,
[...]
> Any ideas?
>
> $add_contact_sql = "INSERT INTO $table_name
> (ContactID, FirstName, LastName, Title, WorkPhone,
> HomePhone,Mobile,EmailName,Birthday,CompanyID)
> VALUES
> ('',
> '$FirstName',
> '$LastName',
> '$Title',
> '$WorkPhone',
> '$HomePhone',
> '$Mobile',
> '$EmailName',
> '$
Hi,
> I have a drop-down menu that has been prepopulated with an array from a
> column name CompanyName. What I need to do is take the CompanyName lookup
> the CompanyID in the company table and insert the CompanyID into a row in
a
> table called contacts with a CompnayID column.
[...]
Is this a
Hi,
> Here is a quick question. Cane the mail() function handle file
attachments?
> I couldnt find anything like that on the PHP reference but maybe someone
> knows out there. If not does anyone have any simple scripts that will
allow
> me to do this?
I think it doesn't. Check e.g http://phpcla
hi,
[...]
> My question is this: how can I select only those first 20 words in the
> PHP code?
SELECT LEFT(YourBlobFiekd, 20) FROM YourTable;
hope it helps
Johannes
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
Hi,
> Any ideas as to what the problem is?
What error do you get? Is the query not working?
Put a mysql_error() into your "or die("The category...")" to get
the exact error message. And try putting quotes around CAtID = '$value'.
> print "Return to the
print "Return to CatIndex";
looks much ni
Hi,
>
> I have a problem:
> with a mysql_query I get the results of a table field into a list page.
> Is it possible to use this result (as link) to open a new page where the
> detailed results of each row are shown?
So you select one field and list it with a while-loop?
Assuming this you can ma
69 matches
Mail list logo