[PHP-DB] 2D array into mySQL DB

2002-01-11 Thread Adam Royle
Hi there... I wrote a PHP script which extracts the title and content from all the HTML files in a directory and puts the filename, title and content into a 2 dimensional array. I know the array is fine because when I print it to the page it dislays properly. When I try to input it into the

[PHP-DB] mail() on Mac OS X

2002-01-15 Thread Adam Royle
I have been trying for months now (on and off) to get mail() working in OS X. I have trid various things, but this is my current setup. If you have any suggestions or if you could put me in the right direction, then I would be glad. - I am using PHP v4.0.6 on Mac OS X 10.1 (pre-compiled with

RE: [PHP-DB] Automatic Listboxes

2002-01-15 Thread Adam Royle
Javascript is your way to do this, but there are obviously a few ways you can do that aswell. You don't want to have to submit a form and reload images/pages etc, so javascript is the only way to go (or dhtml or other stuff) One way to do this is either with layers (hide/unhide depending on what

[PHP-DB] Authentication

2002-01-16 Thread Adam Royle
I have a successful website with authenticatin and logons. There are sections that I allow anyone to get to, but the others have to be authenticated. This site is not using frames at all. its a page by page, with the unit that does the authentication and sessions being included in

[PHP-DB] RE: Recalculation ?

2002-01-20 Thread Adam Royle
You shouldn't need to unset session variables if you're going to use them again, just write over them. And to check if a session variable has been used or not, you can use: if (session_is_registered($qty)){ calcluation in here } If the calculation part is the same in your 'if'

[PHP-DB] RE: MySQL Update help needed

2002-01-21 Thread Adam Royle
A few things to check: 1. You have a connection to the database (I'm assuming you do). 2. mysql_query() is a php function so you should not put a dollar sign before it (indicating it is a variable. If you want mysql_query() to return a variable, do something like this: $result =

[PHP-DB] RE: ensuring unique field value in MySQL using PHP

2002-01-28 Thread Adam Royle
Checking a small database for username/password combination would happen so quick, it would be nearly impossible for two usernames to be entered in. Your script should work properly, but to make sure no duplicates are entered, you can change the column definition using the ALTER columnName

[PHP-DB] RE: FIle Uploading to database

2002-02-03 Thread Adam Royle
You missed the SET parameter in your query... example is below... $query = INSERT INTO Canidate SET (FirstName, LastName, Indus... Adam -Original Message- From: Todd Williamsen [mailto:[EMAIL PROTECTED]] Sent: Monday, February 04, 2002 11:06 AM To: [EMAIL PROTECTED] Subject: Re: FIle

[PHP-DB] Re: Counting db generate links

2002-02-06 Thread Adam Royle
You use a link management system. You can find examples of these all around the web, but I know you can get some at http://www.hotscripts.com They are also probably more complex and flexible than what i describe below. Basically what it does (you could even write it yourself) is this: 1. All

[PHP-DB] Re: option in forms

2002-02-09 Thread Adam Royle
I think this is what you're getting at: select name=artistID option value=?= $row[ID] ??= $row[ArtistName] ?/option /select or something like that so it would look like (in HTML) select name=artistID option value=23Artist's Name First in list/option option value=44Artist's Name second in

[PHP-DB] RE: Outputing Distinct rows

2002-02-10 Thread Adam Royle
What you *should* do is have a lastUpdated field in your posts table, and the value inserted into their is the date when you update it. Then your query would be like $sql = SELECT posts.topic_id, posts.forum_id, topics.topic_title, topics.topic_replies WHERE topics.topic_id =

Re: [PHP-DB] Session confusion :-(

2002-02-18 Thread Adam Royle
I presume that the session is not updating because PHP does not automatically overwrite session variables. You should use something like this: $category = $HTTP_GET_VARS[category]; session_register(category); Session register can be called more than once, and has no effect on current session

[PHP-DB] Re: Special Insertion Into MySQL - at a loss!

2002-02-21 Thread Adam Royle
The following code is how you should retrieve the data from mySQL... if you wanted to update all of the information through one button, though, I would do it in a slightly different way... ?php $sql = SELECT whatever FROM whatever...; $result = mysql_query($sql); while ($row =

[PHP-DB] Question about advanced SQL

2002-02-27 Thread Adam Royle
Hi. I need some guidance for writing an effective query (instead of processing through PHP). I lets says I have two tables, tblCDs and tblOrders. tblCD cdID| cdTitle | cdArtist -- 1 | Great Hits | Bon Jovi 2 | Forever

[PHP-DB] RE: login

2002-03-10 Thread Adam Royle
If the variable $SCRIPT_NAME does not suit your needs, try the other environment variables here: http://www.php.net/manual/en/language.variables.predefined.php Adam -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: Output of curl to an array.

2002-03-21 Thread Adam Royle
Hi Keith, I read your post and decided to write a function for you. Basically what it does is does, is take in a string, and optional newline and value separators, and outputs an associative array. It actually works, and has a few comments... so yeah, enjoy.. and thanks for the challenge : )

[PHP-DB] Re: insert into javascript php

2002-03-22 Thread Adam Royle
PHP cannot recognise javascript variables because javascript is interpreted via the browser, and not the server (which php is). for php to use javascript variables, you must post the variable to another page using either a form or querystring. Adam script

Re: [PHP-DB] marking DB entries...

2002-03-22 Thread Adam Royle
I have done an address book in php, although I kept the username/password in with the rest of their details. If you wanted to keep it all in two tables, then go ahead. You really should have an ID field in every table, whether you use it or not, and most of the times, you'll find you will use

[PHP-DB] Re: urgent guys

2002-03-22 Thread Adam Royle
You cannot use javascript variables in php, nor php variables in javascript, unless you write the variable to the page (for php - javascript) or post to a new page with querystring or form (javascript - php). php - javascript: script language=JavaScript var jsVariable = ?= $phpVariable ?;

[PHP-DB] Re: If else Question

2002-03-26 Thread Adam Royle
Maybe I am missing something but it seems you are doing things in a potentially unreliable way. Firstly... your sql statement in create.php $query_update = INSERT INTO pets (uid) SELECT uid FROM users WHERE uid={$session[uid]}; could simply be mysql_query(INSERT INTO pets SET uid = .

[PHP-DB] Re: PHP/Access problem

2002-03-26 Thread Adam Royle
SELECT * FROM 'Documents'WHERE (CourseRef='4712' AND Valid_From=#26/03/2002# AND Valid_Until=#26/03/2002#) Order by Author,Title should be SELECT * FROM Documents WHERE (CourseRef='4712' AND Valid_From=#26/03/2002# AND Valid_Until=#26/03/2002#) Order by Author,Title your table name should

[PHP-DB] Re: Checking for 2 unique row contents

2002-03-27 Thread Adam Royle
Simple do these checks and you'll be sweet as a nut Adam ?php $sql = SELECT nickname FROM tblUsers WHERE nickname = '$nickname''; $result = mysql_query($sql); $sql = SELECT email FROM tblUsers WHERE email = '$email'; $result2 = mysql_query($sql); if (mysql_num_rows($result)){

[PHP-DB] Advice to PHP beginners

2002-03-27 Thread Adam Royle
Just some advice... You should use a consistent programming style, especially with PHP. You can read some guys advice here. http://www.phpbuilder.com/columns/tim20010101.php3?page=1 Some of the advantages of having a consistent style, is when you are looking for bugs. If you look over your

[PHP-DB] Re: Pop up are you sure...

2002-04-01 Thread Adam Royle
Dave, Javascript is client side. PHP is server side. Obviously the limitations imposed by each of the languages is evident. PHP can't do anything once the output is sent to the browser. JavaScript can't do anything before it gets sent to the browser. But, each is important as the other. Learn

[PHP-DB] PHP tips to make your life easier

2002-04-24 Thread Adam Royle
Hello everybody, There are some techniques which I use that come in REALLY handy when writing PHP (or even ASP). I will just go through them here briefly. Any questions? Email me. 1. Keep a php file (lib.php) inside a 'code' folder in a directory for every site you work on (depending on

[PHP-DB] Re: Adding totals

2002-05-20 Thread Adam Royle
This should be it (if I am understanding you correctly). Adam $strSQL = SELECT SUM(columnName) as sum FROM tblName; $result = mysql_query($strSQL); while ($row = mysql_fetch_array($result)){ $total = $row[sum]; } Hi all, Is there a way for me in PHP4 to

Re: [PHP-DB] new pair of eyes

2002-05-31 Thread Adam Royle
Hey there, I was just looking at your code, and I also look at other's code, and I think people are making life difficult for themselves. Sure a lot of people on this list are beginners, but thats more te reason to simplify code... One thing you should always do, is write functions... I have

[PHP-DB] sql and week starting ending numbers (dates)

2002-06-01 Thread Adam Royle
Hello all, I am creating a finance manager in php and mysql for my own accounting purposes (and to broaden my skills in php and sql) and I have a couple of pages where I view statistics on how much I spend, etc, and what patterns are formed from my spending. I have made a couple of pages

[PHP-DB] Re: SQL Troubles with JOIN, GROUP BY and MAX???

2002-06-04 Thread Adam Royle
I think this is something like you would want... Adam SELECT users.id, username, MAX(stamp) as stamp, filename FROM users, files WHERE users.id = userid GROUP BY username -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: Having trouble understanding how to manage arrays

2002-06-10 Thread Adam Royle
Hi Bill, Looks like you're making it hard for yourself, by querying the database for each record found. Here is some code which should make your life easier. Of course, I have developed functions which would turn the following code into 10 or so lines, but this should work for your situation.

RE: [PHP-DB] Converting values from text to numerical

2002-06-21 Thread Adam Royle
Hi Matt, I think this might be the answer to your problem. It basically checks if the string is an integer. I generally love the PHP automatic type conversion, but sometimes it can trick ya :) if (intval($val) == $val){ // integer stuff } else { // string stuff } Adam

[PHP-DB] Re: Populating multi-select list from mysql

2002-06-21 Thread Adam Royle
Hi Bob, I have written some functions which make select lists much easier. I have two functions: - BuildQuickSelect() - you pass a couple of parameters (tablename, etc) - BuildSelectMenu() - you pass $sql and some more parameters Unfortunately, they require a few things (such

[PHP-DB] Re: getting the value of a javascript variable

2002-06-22 Thread Adam Royle
Hi Hermann, This has been covered many times on this list, but the basics are this: PHP retrieves all information and outputs it into a javascript array - this way all combinations are available to javascript. Then when the user selects a list from the menu, javascript determines the

Re: [PHP-DB] Form not working...

2002-06-26 Thread Adam Royle
What you said (Mike) is mostly correct, although the GetSQLValueString() function in Scott's code automatically puts the quotes around the values if the datatype definition of text is passed to the function. Adam -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP-DB] Re: remove from db renumbering

2002-06-30 Thread Adam Royle
You should not rely on the autonumber as a sorting method. You should use it as a reference. I see you have two easy options (there may be more, but this seems suitable). 1. Get the SQL to pull a random record (requires mySQL 3.23.x or higher) SELECT * FROM tblName ORDER BY RAND()

[PHP-DB] Re: delete multiple records with one query

2002-07-02 Thread Adam Royle
another way to do this is (quicker, using only one query): $delete_IDs = implode(,,$name_array); $sql = DELETE FROM $mysql_table WHERE id IN ($delete_IDs); mysql_query($sql); or you could delete the first line (implode) and take the square brackets out of the name of the form field. this will

[PHP-DB] Re: Refresh after DB Query

2002-07-03 Thread Adam Royle
Sorry if you are a newbie.. but if might help if you delete the records before you select them to display in html ie: put the delete query at the top of the page, just after this line: require (templates/db_connect.php); adam

[PHP-DB] Re: Urent please

2002-07-08 Thread Adam Royle
Simply open the javascript window with a querystring.. so you have some like this in your javascript code: window.open(somepage.php?var1=value1var2=value2,theWindow,width=200, height=300); and if the variables are inside php... use something like this: window.open(somepage.php?var1=?= var1

RE: [PHP-DB] A Simple Question

2002-07-10 Thread Adam Royle
Just a correction you can use arrays with querystrings page.php?var1[]=firstvar1[]=secondvar1[]=third $var1 Array ( [0] = first [1] = second [2] = third ) OR page.php?var1[]=firstvar2[2]=secondvar2[]=third $var 1 Array ( [0] = first ) $var2 Array ( [2] = second

[PHP-DB] Re: HELP NEEDED

2002-07-13 Thread Adam Royle
First of all, you are not using the variable when you are passing it to the sql string. Second, you are doing a pointless var check, and thirdly, your condition statement is flawed. 1. SQL should be (if you have register globals turned on, otherwise you must use $_GET['_Name1'] ): $_query =

[PHP-DB] Re: Construct, Q+E, QBE

2002-07-17 Thread Adam Royle
This sounds very interesting. As far as I know, there are no automatic functions to do this, although i don't think it would be too hard to write the php function to do this. If end up finding a solution, please email it to me (and the list), or if you need a hand in writing it, I'd be happy

[PHP-DB] To Bo

2002-07-21 Thread Adam Royle
Study these two parts in the manual, and you will know how to do everything you've mentioned (and more). http://www.php.net/manual/en/ref.strings.php http://www.php.net/manual/en/ref.array.php Adam

[PHP-DB] Re: php and javascript?

2002-07-22 Thread Adam Royle
Just reiterating over what the others have said (plus expanding), and just a bit cleaner. SCRIPT language=JavaScript !-- function deleteRecord(recordName, recordID) { if (confirm(Do you really want to delete + recordName+?){ window.location = /delete.php?id=+recordID;

[PHP-DB] Re: Pulling a data from array of checkboxes

2002-07-28 Thread Adam Royle
This is friendlier, cleaner and faster way to return the results. $chk = implode(, , $chk); $sql = SELECT field1, field2 FROM tblName WHERE ID IN ($chk) ORDER BY ID; this should bring back all the records within one resultset, which is easier to manage Adam -- PHP Database Mailing List

[PHP-DB] Re: Auto Increment Problems....

2002-07-29 Thread Adam Royle
Firstly, don't cross post unless the question *really* has to do with both (in this case, it should be just db). Secondly, your id field should only be used as a reference to a row (not showing order of record). Auto increments are exactly that, the rdbms will take care of creating the

[PHP-DB] Benefits of assigning query to variable

2002-07-31 Thread Adam Royle
Yes, I see a few benefits. 1. It makes the code easier to read. 2. It makes the code easier to debug. Imagine the following: $sql = SELECT * FROM tblName; $result = mysql_query($sql); Now if you want to print the sql and not do the select, you would simply add a line $sql = SELECT * FROM

[PHP-DB] Re: Multiple select ?

2002-08-01 Thread Adam Royle
Try using parentheses inside your sql: Select * from table_name where (col1=1 OR col2=1) and col3=0 Select * from table_name where col1=1 OR (col2=1 and col3=0) They make a big difference, also helps to indentify what you're selecting when you come back to the sql later. Adam

Re: [PHP-DB] Need Advice on Installing PHP MySQL on Mac OSX

2002-08-11 Thread Adam Royle
You need to uncomment two lines in the httpd.conf file then restart apache there are many places on the internet where it shows which lines (you could do it yaself, it has php4 in the lines) also, make sure apache is turned on, you can do this inside system preferences apple has some good

[PHP-DB] Re: Date Subtraction

2002-08-21 Thread Adam Royle
Use getdate() with mktime() and this is your solution. http://www.php.net/manual/en/function.getdate.php http://www.php.net/manual/en/function.mktime.php Adam

Re: [PHP-DB] full text search and how to underline keyword in results

2002-08-25 Thread Adam Royle
The first argument passed to eregi_replace is .$keywords[$i]. You are concatenating the string and a space on the end and front. This was obviously used as a hack to make sure only full words were highlighted. A fix for this? A simple hack would be to take out the spaces, so it is simply

[PHP-DB] Re: [mysql] freeing resources

2002-09-02 Thread Adam Royle
Yes, PHP is very cool, and handles memory management for you. mySQL resultsets and connections are cleaned up once the page has finished executing (is in manual). The reason why you would want to use these functions is if you have a script that does not finish (such as one that handles port

[PHP-DB] Re: assist with SORT array

2002-09-10 Thread Adam Royle
Bartosz was correct in saying that you should use your query to sort, rather than sorting array. And the array is actually sorted, although it keeps its index. See the manual reference on arrays to see how they work. To iterate over sorted arrays, use the foreach() construct. Anyway, the

[PHP-DB] Re: password function

2002-09-24 Thread Adam Royle
When using aggregate functions in sql, it is good to name that expression using the AS keyword. Try this: $result = mysql_query(select password(.$_POST['password'].) AS pword); while ($p = mysql_fetch_array($result, MYSQL_ASSOC)){ $pswrd=$p['pword']; } Also, like David said, you should

[PHP-DB] Advanced search scripts

2002-10-08 Thread Adam Royle
I was wondering if anyone has some resources (links or scripts) on 'advanced site searches'. Something that is similar to the way regular search engines process requests. ie. phrase or two word +required -not included Also, returning details of that search, say for example returning 10

Re: [PHP-DB] Advanced search scripts

2002-10-09 Thread Adam Royle
are you using? ---John Holmes... -Original Message- From: Adam Royle [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 09, 2002 2:09 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Advanced search scripts I was wondering if anyone has some resources (links or scripts) on 'advanced site

[PHP-DB] Re: Accessing data from next row? (mysql)

2002-10-14 Thread Adam Royle
Create an array and go through the array as needed. Here is some code from one of my db functions: $DB_RESULT = mysql_query($sql) or die(Error executing query: . mysql_error()); // create an empty array to fill with data $arrData = array(); $rowCount = 0;

[PHP-DB] Re: Accessing data from next row? (mysql)

2002-10-14 Thread Adam Royle
Also, if you're not sure how to get the values from $arrThisRow / $arrNextRow: echo $arrThisRow['columnName']; or $arrData[$i]['columnName'] if you want to access it manually without the other two arrays adam On Monday, October 14, 2002, at 06:05 PM, Adam Royle wrote: Create an array

[PHP-DB] .htaccess and db authentication

2002-10-14 Thread Adam Royle
I was wondering about people's thoughts on file security through php using database authentication. Take the following example: I have a folder (in webroot) called /videos/ which contains a heap of files like so: video_1_14-06-2002.mpg video_2_15-06-2002.mpg video_3_16-06-2002.mpg

[PHP-DB] Re: Displaying a single picture...

2002-11-12 Thread Adam Royle
You could do something as simple as this: a href=displayPic.php?image=/path/to/image.jpgtitle=This is my titleimg src=/thumb.jpg border=0/a I think most browsers will convert the spaces in the link (when clicked) to '+' or '%20', but this may not be true with some less popular browsers (i

[PHP-DB] Re: how to put all rows into an array

2002-11-13 Thread Adam Royle
No built-in function, but this can be handy (i have it inside a getData() function, which also lets me output data in a number of ways) HTH, Adam $sql = SELECT * FROM .; $DB_RESULT = mysql_query($sql); $arrData = array(); $rowCount = 0; while ($r =

RE: [PHP-DB] php sessions using mysql (or any db)

2002-11-18 Thread Adam Royle
Hi, Just wondering, which is the better method: 1. Using PHP sessions ($_SESSION['var'] = val;) 2. Using mySQL-based sessions (as described in this thread) I know if you're using multiple servers, a DB-based session would be handy. Any comments, anyone? Adam

RE: [PHP-DB] Check data exists in MySQL

2002-11-21 Thread Adam Royle
Sorry about previous post (some stupid shortcut key made it send) Your row: $sql = INSERT INTO count VALUES('$dept', '$deptsub', '0'); should be: $sql = INSERT INTO count VALUES('$dept', '$deptsub', '0'); You missed the double quotes. Adam --- Original Message --- Hi, for some reason

[PHP-DB] Re: Check Automaticaly

2002-12-08 Thread Adam Royle
I would imagine your game would have two frames (one hidden frame), and the hidden frame would contain scripts to check and update page. In the bottom frame i see you might have two choices: 1. have a meta refresh which checks every 5 (or so) secs if a move has been made, and if detects a

[PHP-DB] Re: Delay Confirmation....

2002-12-09 Thread Adam Royle
Use: set_time_limit(0); // let script run forever Have a look at output control functions, particularly: ob_start(); ob_flush(); They might help you Adam --- Original Message --- Hi, I'm still new in PHP..., I have some problem in using sleep() function. Actually, I want to make a script

[PHP-DB] Re: Finding zipcode within radius of another zipcode.

2002-12-25 Thread Adam Royle
There are databases / packages you can buy which already have this information in them. A simple search for 'purchase postcode database' on Google gave me a few leads. Adam Hi folks, I'm building a PHP/MySQL database for a customer. It's an advanced mailing list for a band. They want to be

[PHP-DB] Re: File Upload ---Thanks!

2003-01-07 Thread Adam Royle
Yep. Been using Mac OS X (10.1 - 10.2.3) with mySQL no problems. I built it from source first time, but now I just use Mac OS X packages from Mark Liyanage. You can find them here. Also he has a good pre-compiled PHP4 you can download and use. http://www.entropy.ch/software/MacOSx/mysql/ Adam

[PHP-DB] Re: mysql_errno() list?

2003-01-10 Thread Adam Royle
Just use a combination of mysql_errno() and mysql_error(): echo mysql_errno() . : . mysql_error(). \n; Adam PS. Documentation always rocks! Hi guys, I've been playing with PHP for a while now, and love the mysql functions, but there's one thing I'd like to know... I want to check if a

Re: [PHP-DB] javascript and submitting forms

2003-01-14 Thread Adam Royle
Hi Mignon, This should work, never closing the window without submitting (foolproof). Just add some error checking, and you'll be sweet as a nut! All I did was add the echo statement underneath the data insert. Adam ? include ('dbconn.php'); if(isset($submit)) { $query = INSERT INTO

[PHP-DB] Re: Email to a list of address in your database.

2003-01-19 Thread Adam Royle
This should work. You were on the right track, although you might want to use better var names so you don't get confused. You can see I have changed them to what I would normally use. Adam ?php $sql = select * from users; $result = mysql_query($sql, $connection) or die(Couldn't execute

[PHP-DB] Re: Using strlen and substr to Shorten DB Results

2003-01-26 Thread Adam Royle
Try this. PHP arrays are cool! Of course there are tidier ways to implement this, but this is just an example. Adam -- Code -- $getscname = mysql_query(SELECT * FROM subcat WHERE subcatid = '$subcatid') or die (Couldn't get the info.br.mysql_error()); while($sub_cat =

[PHP-DB] Re: Images-weird!!

2003-02-02 Thread Adam Royle
Hi Mihai, Didn't try your code, but noticed your comment on colours. RBG values go from 0 - 255, not 1 - 256, so this may be your problem. Adam

RE: [PHP-DB] A little JOIN help please...

2003-02-04 Thread Adam Royle
SELECT B.Title FROM phpCalendar_Details AS B, phpCalendar_Daily AS A WHERE A.CalendarDetailsID = B.CalendarDetailsID AND CURDATE( ) BETWEEN A.StartDate AND A.StopDate Also, you don't need to use the backticks around field names unless they contain spaces or other reserved words and

[PHP-DB] Re: Web Page Caching

2003-02-16 Thread Adam Royle
This may not be true in your case, but I remember another user on this list claiming a similar thing, and his problem was actually code-related. He had his db update code *AFTER* the results were displayed (ie. doing edit and save on same page). Check your programming logic. Just a note to

[PHP-DB] Re: Recordsets and associative arrays

2003-02-17 Thread Adam Royle
Hi Don, Use this process: ?php // create an empty array to fill with data $data = array(); $row = 0; while ($r = mysql_fetch_assoc($result)){ foreach ($r as $key = $value){ $data[$row][$key] = $value; } $row++; } ? The array structure would be something like this:

[PHP-DB] Re: Using results from one mysql query to make another

2003-02-27 Thread Adam Royle
SELECT b.name FROM apliexperts a LEFT JOIN experts b ON a.expid = b.id WHERE softid = 2 I have a table that includes the ids of software aplications and experts (apliexperts). My page is loaded with the variable of the software id (softid), which it uses to match the experts for that software.

Re: [PHP-DB] Processing Page

2003-02-27 Thread Adam Royle
I have seen an example using JavaScript where javascript commands are flushed every so often (from PHP) which indicates a status bar process. It was used to monitor mailouts. The javascript commands were simply telling an image to increase it's width. Of course you have to have a system where

[PHP-DB] Re: Dynamic Variable names

2003-03-09 Thread Adam Royle
It's probably better to use arrays. $tips[0] = value; $tips[1] = value; $tips[2] = value; Although, if you REALLY want dynamic variable names. $i = 1; $varname = 'tips_'.$i; $$varname = value; this will make a variable like below: $tips_1 = value; But like I said before, it's better to use

[PHP-DB] Re: adding to an array variable using a loop...?

2003-03-10 Thread Adam Royle
I assume the field 'date' in your database is a date field, and in your code you are trying to do a date + 1, but you are not specifying *what* you are adding to the date (ie. 1 day, 1 week, 1 month), therefore the whole variable is being replaced (with a 1). Try looking at the various date

[PHP-DB] Re: PHP script execution - display issue

2003-03-13 Thread Adam Royle
This is neither a PHP nor database question. This is client side. Anyway, a simple fact is that tables won't render until the whole table has been loaded into memory (ie. it won't show until it reaches the /table tag). If you have your whole site inside one big table, then this is what is

Re: [PHP-DB] Regular Expressions? URGENT

2003-08-02 Thread Adam Royle
Hi Aaron, I found this on a little useful when I started learning regex. Good luck 2 ya! adam http://www.devshed.com/Server_Side/Administration/RegExp/ Hi All, Sorry for OT post but need some info. Does anyone know a good tutorial that explains regular expressions in DUMMY terms? I have a