Hi Herman,
Try something like this...
$dbname = "my_db";
$tablename = "my_table";
$table_def = "item_id MEDIUMINT DEFAULT '0' NOT NULL AUTO_INCREMENT,";
$table_def .= "item_name VARCHAR(50) BINARY NOT NULL,";
$table_def .= "lastaccessed TIMESTAMP(14),";
$table_def .= "PRIMARY KEY (item_id),";
$
Hi everyone
I am using a website based in the states to which is PHP enabled. I am using
MySQL.
Is there a way to create a table with PHP? I do not see any command for
that.
I have loaded MySQL for Windows but the server runs MySQL on Unix. I don't
know if the file structure is different. Maybe
Thanks Alex!! I'll give that a go!
-Original Message-
From: Alexander Fordyce [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 24, 2001 8:07 PM
To: Tyrone Mills; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Can't get my head around this problem...
Looks to me like you'd be better off using an
Looks to me like you'd be better off using an associative array, since
associating the count with the day of the week is the whole point. How
about...
while (list($count, $day) = db_fetch_row($result))
$lastweek[$day] = $count;
You'd have to tweak the logic of the rest of the script to use
That will zero fill any elements that don't have data, but it won't move the
data in the elements to the right positions. Each element is supposed to
represent a day of the week, starting at Sunday. So if I have data
representing calls that came in on Tuesday and Thursday, I need that data in
elem
Perhaps...?
$x = 0;
while ($x < 7)
{
if (!isset($myArray[$x]))
{
$myArray[$x] =0;
}
}
-Szii
- Original Message -
From: "Tyrone Mills" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 24, 2001 3:58 PM
Subject: [PHP-DB] Can't get my head around this problem...
Hey,
I'm trying to figure out how to make a custom message. What I have is a
form with a TEXTAREA named MAILFROM. I want to be able to write an e-mail
in that section like so:
Dear $username.
When I press submit, I want the query to cycle through a list of names (got
this part) and where it f
Hello all...
I've got what is probably a stupid question, it's a problem I can't seem to
get my head around it. Any help will be greatly appreciated.
I'm pulling a count of connections from a MySQL database and the day of the
week it occurred on. Now the result set doesn't include empty values,
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.
This will probably sound simple to all of you but I am hitting my head on
a brick wall so far :-).
I need to generate a list (sorted by descending time) of different objects
referenced in multiple tables. All those objects share a key related to a
project.
This works splendidly from a sin
>sportdb.table_name.username_field = mysql.user.User
Do I not need to define for php what 'mysql' is, as I've done for
'sportDB' ?? and is there any specific sort of JOIN I need to do??
Many thanks for your prompt reply..
Regards:
Russ
#-
Why not just JOIN the tables using new columns in the sportDB? For instance,
if your user names in the sportDB database and the user names in the mysql
database match up, just do a JOIN ... ON sportdb.table_name.username_field =
mysql.user.User
You don't need two connections.
Jonathan
-Orig
Hi all:
I want to be able to update,insert and delete identical information in 2 tables that
lie in
seperate Databases from my PHPfront-end.
The info I am editing is username/access info for table data
privileges. One table called 'users' is in my own DB: 'sportDB' and the
other is the 'use
Hi,
This is probably a tough one and there might not be an easy solution. Here
goes:
Could anyone give me some ideas on how I could use PHP to authenticate a
user logon against either a *nix or NT system. In the case of a *nix, it
would be Linux with existing accounts held in typical passwd / sh
it's always eaiser to count the parens and braces backwards to make sure
they're all there. i do it all the time.
On Tue, 24 Apr 2001, Thomas Lamy wrote:
> > Marc S. Bragg [mailto:[EMAIL PROTECTED]] wrote:
>
> >
> > Hi
> >
> > Anyone have any idea of what the syntax error in this statement is
Can you get to the Database / Interbase server using an interbase client,
like Ibconsole?
man <[EMAIL PROTECTED]> schrieb in im Newsbeitrag:
[EMAIL PROTECTED]
> Hi,
>
> I tried to connect to remote Interbase server. There is a result below:
>
> Warning: InterBase: Unable to complete network req
> Marc S. Bragg [mailto:[EMAIL PROTECTED]] wrote:
>
> Hi
>
> Anyone have any idea of what the syntax error in this statement is?
>
> else if (($op == "ds") && ($action == "sub") && ($password ==
> $passnog)
> && ($password) &&
> (!eregi("^([a-z0-9_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,4
>
> Johannes Janson [mailto:[EMAIL PROTECTED]] wrote:
>
> You can output the passed varibles from the previous page
> in an in the form of the following page.
>
> Johannes
>
But be sure to urlencode() your data before putting in the hidden fields,
and decode them when you enter the next page.
T
The HTTP_POST_VARS variable is an array of all the variables posted from the
previous page. I did the same thing a lot and finally ended up creating this
function:
// Function to Pass Posted Variables as Hidden
function PassHiddenVars ()
{
// Bring in Posted Vars
global $HTTP_POST
Hi
Anyone have any idea of what the syntax error in this statement is?
else if (($op == "ds") && ($action == "sub") && ($password == $passnog)
&& ($password) &&
(!eregi("^([a-z0-9_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,4}$",$email))
{
It worked fine until I added the tricky part:
&&
(!eregi
Use sessions. This will store the values on the server rather than
passing them back and forth. Lots less typing too.
On Tue, 24 Apr 2001, Johannes Janson wrote:
> You can output the passed varibles from the previous page
> in an in the form of the following page.
>
> Johannes
>
>
> "Brinzoi
There is also a program called asp2php. I'm sure how effective it is.
http://asp2php.naken.cc/
You are probably best off rewriting the site. That way you will know
exactly what is going on, and can use some of the more advanced features of
php.
Robert Zwink
-Original Message-
From: T
Hi,
I tried to connect to remote Interbase server. There is a result below:
Warning: InterBase: Unable to complete network request to host
"192.168.1.10". Failed to locate host machine. Undefined service
gds_db/tcp. in ...
File services on remote Interbase server contains:
gds_db3050/t
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 !
Here is the problem: I got 8 pages, shown one after another. Each have 2
buttons (one for continue and one for abort). When I click to "Continue" I
go to the next page. On the last page I have to submit ALL variables from
these 8 pages to the database.
My test shown that only the variables
Thanks for the pointer about ' vs ". I have changed my code to used
these. The code is a lot cleaner. I am still getting a not found error.
Below is the new "cleaner" messages that I display. One point that may be
important, FLD_Name and FLD_Path are the primary key. Couple of
questions, can
Hi,
We are trying to save a multiline textfield without changing anything in a
sql database via odbc. With ASP, ITAP, etc this can be done with a bind var
(':var') in the insert string. This seems not to be functioning with PHP. We
do not want to edit the value of the var, we only want to save th
27 matches
Mail list logo