RE: [PHP-DB] Creating tables

2001-04-24 Thread Tyrone Mills
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),"; $

[PHP-DB] Creating tables

2001-04-24 Thread Herman Wapenaar
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

RE: [PHP-DB] Can't get my head around this problem...

2001-04-24 Thread Tyrone Mills
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

RE: [PHP-DB] Can't get my head around this problem...

2001-04-24 Thread Alexander Fordyce
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

RE: [PHP-DB] Can't get my head around this problem...

2001-04-24 Thread Tyrone Mills
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

Re: [PHP-DB] Can't get my head around this problem...

2001-04-24 Thread Szii
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...

[PHP-DB] Insert Variables Into A Passed String

2001-04-24 Thread SOHH.com Webmaster
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

[PHP-DB] Can't get my head around this problem...

2001-04-24 Thread Tyrone Mills
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,

Re: [PHP-DB] getting rows from multiple tables into a single array ? (newbie, mysql)

2001-04-24 Thread Johannes Janson
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

[PHP-DB] getting rows from multiple tables into a single array ? (newbie, mysql)

2001-04-24 Thread Nicolas Mermet
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

[PHP-DB] Querying 2 databases...???

2001-04-24 Thread Russ Michell
>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 #-

RE: [PHP-DB] Querying 2 databases...???

2001-04-24 Thread Jonathan Hilgeman
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

[PHP-DB] Querying 2 databases...???

2001-04-24 Thread Russ Michell
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

[PHP-DB] Authentication - a tough one?

2001-04-24 Thread Chris
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

Re: AW: [PHP-DB] syntax error - -- agghhh!

2001-04-24 Thread beckie pack
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

Re: [PHP-DB] interbase

2001-04-24 Thread Theo de Jong
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

AW: [PHP-DB] syntax error - -- agghhh!

2001-04-24 Thread Thomas Lamy
> 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 >

AW: [PHP-DB] Variable passing

2001-04-24 Thread Thomas Lamy
> 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

RE: [PHP-DB] Variable passing

2001-04-24 Thread Jonathan Hilgeman
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

[PHP-DB] syntax error - -- agghhh!

2001-04-24 Thread Marc S. Bragg
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

Re: [PHP-DB] Variable passing

2001-04-24 Thread johndmiller
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

RE: [PHP-DB] Convertin Asp to Php

2001-04-24 Thread Robert V. Zwink
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

[PHP-DB] interbase

2001-04-24 Thread man
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

Re: [PHP-DB] Variable passing

2001-04-24 Thread Johannes Janson
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

[PHP-DB] Variable passing

2001-04-24 Thread Brinzoi Constantin Aurelian
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

[PHP-DB] RE: [PHP] trouble reading a database (fwd)

2001-04-24 Thread johndmiller
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

[PHP-DB] BIND VARS with ODBC

2001-04-24 Thread Martin Jussel
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