Search found 16 matches

by craigh
Sat Mar 22, 2003 7:02 am
Forum: Databases
Topic: Database help for a newbie
Replies: 3
Views: 1107

Re: Database help for a newbie

Try what is below. Also does the print $sql print what you would expect? Is $id being accurately included? <?php if ($id) { $sql = "UPDATE guestbook SET name='$name',location='$location',email='$email',check='$check',homepage='$homepage',comment='$comment',ip='$ip',date_time='$date_time',author...
by craigh
Fri Mar 21, 2003 5:54 pm
Forum: Databases
Topic: Multiple Categories for 1 Item ????
Replies: 3
Views: 1408

I never would have thought of that but that totaly makes sense. :-) Well, that is called normalization and it makes sense because someone else (much smarter than me) figured it out a long time ago. The code you gave me what does each part do? complicated to explain. Can you be more specific? This o...
by craigh
Fri Mar 21, 2003 2:29 pm
Forum: Javascript
Topic: print a page
Replies: 7
Views: 4753

how about clicking the print button on the browser?
by craigh
Fri Mar 21, 2003 2:26 pm
Forum: Databases
Topic: Multiple Categories for 1 Item ????
Replies: 3
Views: 1408

So what you are doing is trying to get a many-to-many relationship between the two tables. In order to do this, you need third table. categories cat_id INT cat_name varchar items item_id INT item_desc varchar items_categories item_id cat_id Then, this third table show the relationship between the tw...
by craigh
Tue Mar 18, 2003 4:27 pm
Forum: Databases
Topic: Database Quaries Bein Stupid
Replies: 1
Views: 940

Re: Database Quaries Bein Stupid

try this:

Code: Select all

ALTER TABLE forum ADD minviewposts SMALLINT(5) DEFAULT 0 NOT NULL
you don't need the quotes to make it work I don't think.
by craigh
Mon Mar 17, 2003 4:04 pm
Forum: Databases
Topic: Help me !!!
Replies: 17
Views: 3884

Re: Help me !!!

<?php MySQL_CONNECT($hostname,$username,$password) or DIE("DATABASE NO RESPONDE"); mysql_select_db($dbName)or DIE("Tabla no disponible"); $result=mysql_db_query("auth","select * from tabla1"); $number = MySQL_NUM_ROWS($result); $size = 1; while($size <= $numb...
by craigh
Mon Mar 17, 2003 3:55 pm
Forum: Databases
Topic: Transferring Mysql databases
Replies: 1
Views: 967

It is easier to use mysqldump from the command line to do that all in one step. go to a command line and type man mysqldump and follow the directions.
by craigh
Mon Mar 17, 2003 7:18 am
Forum: Databases
Topic: Help me !!!
Replies: 17
Views: 3884

Re: Help me !!!

lapicki wrote:$size it is a variable that indicates the number of row within the table

$nom it is the entered value to modify the name of that field, from another form
OK - so what are the answers to the previous post?
by craigh
Sun Mar 16, 2003 7:24 pm
Forum: Databases
Topic: Help me !!!
Replies: 17
Views: 3884

$sSQL="Update Table1 Set Nombre=$nom".$size." where Legajo='024'"

is $nom a variable? is $size a variable?

how about:

$sSQL="Update Table1 Set Nombre=".$nom.$size." where Legajo='024'"

??
by craigh
Sun Mar 16, 2003 7:19 pm
Forum: PHP - Code
Topic: Begginer Question....
Replies: 2
Views: 893

what did you name the file (with suffix)?
by craigh
Sat Mar 15, 2003 8:54 pm
Forum: PHP - Code
Topic: comments please
Replies: 0
Views: 701

comments please

pardon the pseudo cross post, but the PHPMac forum isn't seeing a lot of traffic. I'm looking for a few answers to some general questions, they just happen to be running on my Mac - could you please see this? Thanks!
by craigh
Sat Mar 15, 2003 12:01 pm
Forum: Databases
Topic: need help a compicated select statement
Replies: 1
Views: 874

Re: need help a compicated select statement

basically i need a statement that will select the fields listed in the course table with lecturerName given a variable that holds the courseCode. select course.*, lecturer.lecturerName from course left join lecturer_course on course.courseCode=lecturer_course.courseCode left join lecturer on lectur...
by craigh
Wed Mar 12, 2003 9:33 pm
Forum: PHP - Code
Topic: Expire?
Replies: 17
Views: 3561

yeah sure, see the mktime and date functions in the PHP manual at php.net to see how.
by craigh
Wed Mar 12, 2003 9:23 pm
Forum: PHP - Code
Topic: Expire?
Replies: 17
Views: 3561

don't delete the account, simply disable it. Create a column in the DB 'enabled' and make it default to 'Y' and after 30 days change it to 'N'. Then check their enabled status before allowing one to log in. I assume that you would want to keep their info around or allow them to re-enable the account...