181 Posted Topics

Member Avatar for leviathan185

I tripped on this a few times myself, early on. As you have discovered, there's a strict order in which data are to be sent to the browser. Headers first, then the HTML. It isn't that 'the header has already been passed'; rather, it's that data [i]other than[/i] headers have …

Member Avatar for leviathan185
0
139
Member Avatar for darnoc

Check your ed script. I'll bet there is at least one space at the beginning of most of the lines, which happens when one copy/pastes from a web browser. The ed() commands should be at the beginning of the line. The solo '.' that indicates the end of new data …

Member Avatar for darnoc
0
180
Member Avatar for juanki09

[QUOTE=juanki09;874760]...[CODE]$sql= "select * from PRODUCTS where Type="$Type" and Brand="$Brand" and Size="$Size" order by ProductID"); ... [/CODE][/QUOTE] This statement (as well as others like it) is not quite correct. Foremost, delete the close paren ')' at the end of the line. Next, you are concatenating strings, which usually requires the concatenation …

Member Avatar for Fest3er
0
156
Member Avatar for bettina702

[QUOTE=bettina702;874185]Hi, I want to update a specific field in my database. My database has only one row with one field in it. How do I overwrite that field? This is what I have at this point, but its not working: [CODE]mysql_query(UPDATE Table SET column = "$item" WHERE column = "1") …

Member Avatar for bettina702
0
1K
Member Avatar for joinup

Each of your -exec clauses needs to be terminated with an escaped semi-colon, as in: [code] find / -name \*JPG -exec chmod 644 {} \; -print [/code] At least the shell and possibly find() are having trouble determining where the find's -exec command ends.

Member Avatar for joinup
0
108
Member Avatar for AirmanTheGreat

[QUOTE=AirmanTheGreat;867353]Hello, I received a question whereby I had to convert to fractional decimals to binary. 0.28125 and 0,65625 Using the methods taught me to convert them to fractional binary I got .01001 and .10101 respectively. Next we were required to add the two binary fractions, which my answer was: .11110 …

Member Avatar for Fest3er
0
127
Member Avatar for saurav.prasad28

[QUOTE=saurav.prasad28;866463]... I need to sort out all B that only has CAPITAL letter inside the letter and the out put will be displayed like this A B "1" "SAntOsh" "2" "SAuraV" "5" "SAthiYa" Please help me out for this question :icon_cry: Thanks in Advance[/QUOTE] You need a regular expression. Something …

Member Avatar for Fest3er
0
146
Member Avatar for iceman29

Weird, but it can be done. [code] CUST_1=filename b=1 eval c=\$CUST_$b echo $c [/code] There may be easier ways to do what you mean, like using an array. But this works, and gets points for being 'clever'.

Member Avatar for iceman29
0
125
Member Avatar for rizrash

In order to relate two tables of information, you need a value that ties them together, a value that is the same in each. If you give each company in the CompanyName table a unique ID, you then store those ID values in the ShareRate table with records containing containing …

Member Avatar for Fest3er
0
131
Member Avatar for santhanalakshmi

MySQL has a migration toolkit available; I think it is part of typical distributions. See [url]http://dev.mysql.com/doc/migration-toolkit/en/index.html[/url] for the documentation. Try [url]http://forums.mysql.com/read.php?60,27738,27738[/url] for good leads on how to accomplish what you want. I've used this toolkit to migrate a Win/Access database to Linux/MySQL.

Member Avatar for Fest3er
0
73
Member Avatar for Butz

[code] IT WAS TRUE 25 HYPHEN 30 YEARS AGO AND IS STILL TRUE TODAY COLON TALK TO THE BEAR FULLSTOP COLON RIGHTPAREN IF YOU DON APOSTROPHE T UNDERSTAND SOMETHING COMMA SPEAK OUT LOUD SEMICOLON THE ACT OF TALKING SLOWS YOUR THOUGHTS AND FORCES YOU TO ORGANIZE THEM FULLSTOP# THAT SAID …

Member Avatar for Fest3er
0
116
Member Avatar for kssi89

May I suggest keeping all numbers as true numbers? Only convert them to formatted strings when you display them to the user. You might be mixing numbers and strings in your arithmetic operations--strings don't always convert nicely to numbers. :)

Member Avatar for almostbob
0
120
Member Avatar for nadineatwaroo

[QUOTE=nadineatwaroo;858899]...I have a db in sql server with some large tables and I would like to transfer the entire db from one server to another server without having to create the tables and so on. Is this possible?[/QUOTE] It would seem to be possible. Use the BACKUP command to make …

Member Avatar for Fest3er
0
87
Member Avatar for sandeep_more97

[QUOTE=sandeep_more97;853833]... i. e. i want to send FORM data to two different pages. [code] document.form.action = 'xyz.com/order/email_order.php'; document.form.submit(); document.form.action = 'https://www.paypal.com/cgi-bin/webscr'; document.form.submit(); [/code] Its working fine in Mozilla but not in other browsers..... Or Is there any other solution?? ....i dont want 2 submit button.[/QUOTE] You should go to PayPal's …

Member Avatar for sandeep_more97
0
305
Member Avatar for goodluck4287

Slightly outside my normal realm; I rarely (almost never) use perl. However.... "perl -w ..." is your friend. It'll show you a lot of stuff that's normally 'hidden'. Such as it appears that filehandles need to be UPPERCASE. The second script needs to use the same IP address the listener …

Member Avatar for Fest3er
0
197
Member Avatar for srpa01red

Of course there is. Don't be ridiculous. :) :) [code] #! /bin/sh typeset -i i typeset -i imax i=0 imax=1000 while [ $i -lt $imax ]; do mysql -e 'insert into mytable set mycol='myval' i=i+1 done [/code] Adapting it and making it work for you is your job. :) :)

Member Avatar for Fest3er
0
35
Member Avatar for externalaw

[QUOTE=externalaw;840118]Sorry yes, in a text file. Then I can export my database to excel and cut and paste the two columns into there, and import it back into phpmyadmin, a total noob way of doing things I am sure! Mike[/QUOTE] I think it would be easier to write the shell …

Member Avatar for externalaw
0
144
Member Avatar for lehe

[QUOTE=lehe;837950]Hi, Here is my code, [code] ids=(1 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 90 100 110 120) for ((i=0;i<${#ids};i++)); do awk '{ print ${ids[${i}]}" "$1; }' > ${TMP} < ./results/$1${ids[${i}]}/test_error.dat done [/code] I got this error if I changed awk …

Member Avatar for Fest3er
0
172
Member Avatar for Bhoot

You seem to be right; awk/gawk do seem to have limited REs. But I do have a wiseacre solution. :) [code] alias awk=egrep awk "^.(.)\1" emp.list [/code]

Member Avatar for ghostdog74
0
298
Member Avatar for PinoyDev

In short, "WHERE field=value", you should have "value" inside single quotes ('). I stubbed my toes on this many times until I learned to put the value in quotes. Unless it was a function, of course.

Member Avatar for PinoyDev
0
154
Member Avatar for lml108

Why's it work? Matter inside double quotes (") is interpreted/evaluated by the shell. Matter inside single quotes (') is not. It's a handy tool, but can cause some stubbed toes along the way. :)

Member Avatar for Fest3er
0
86
Member Avatar for chris5126

[code]/usr/ucb/ps -auxxx | awk '{printf("%4s %4s %5s %4s %s\n", $3,$4,$2,$1,$11)}' | grep -v 0.0[/code]probably does what you really want: line up the columns. If you truly want the numbers to be %5.2f format, you'll need to treat the column heading line differently. Another option that might work:[code] ps -eo '%cpu …

Member Avatar for Fest3er
0
2K
Member Avatar for rhesus303

Perhaps the '!' and the '[' should be swapped. Usually the 'not' works better if it's part of the test. :) Of course, shell scripting has become somewhat, mmm, different in the past 20 years, so it might just work the way you wrote it.

Member Avatar for Fest3er
0
77
Member Avatar for rEhSi_123

[QUOTE=rEhSi_123;818997]... Right well got the serachphrase working,,,,,now the issue is I want the searchphrase to be contained in double quotes if it contains spaces or have each space preceded by a backslash. Any help with this????[/QUOTE] In shell programming, ensuring that arguments are properly quoted is an exercise left to …

Member Avatar for Fest3er
0
174
Member Avatar for kjain
Member Avatar for dewhickey

To strictly answer the OP's question: [code] LOCK TABLES active WRITE, archive WRITE; INSERT INTO archive SELECT * FROM active WHERE active_rec_id='$confirmed_id'; DELETE FROM active WHERE active_rec_id='$confirmed_id'; UNLOCK TABLES; [/code] The LOCK and UNLOCK are shown in case you want/need 'atomic' updates. This worked for a simple table. It might …

Member Avatar for almostbob
0
5K
Member Avatar for gpittingale

[QUOTE=lifeofapirate;792151]You folks are really helpful and knowledgeable. I wish I knew as much. I'm just a humble DreamWeaver user. Don't laugh. Well, okay you can. Where would I go to learn this stuff?[/QUOTE] You would go home and reference the same resources I did:[list][*][url=http://www.w3.org]HTML and CSS specs[/url] [*][url=http://www.php.net/manual/en/index.php]PHP Manual[/url] [*][url=http://dev.mysql.com/doc/#refman]MySQL …

Member Avatar for Fest3er
0
140
Member Avatar for DBGuy007

Considering that translation/interpretation is usually one-to-many, you might be better off with option 1, where you have your vocabularies cleanly stored in the two language tables and your third table defines the relation (translation/interpretation) between the languages. This would also make it easier (in a manner of speaking) to add …

Member Avatar for tesuji
0
115
Member Avatar for architact

[QUOTE=architact;777350]Hello, I am developing a website but I am stuck at a point. I have a table having Sundays, video, and photo1, photo2, photo3 as columns. I have a form on a web page having three check boxes "with videos", "with photos" and "Open on Sundays", I want to get …

Member Avatar for Fest3er
0
94
Member Avatar for ntman4real

[QUOTE=ntman4real;782499]... Any ideas of how I can declare the users input as a unique variable each time and then store it until I calculate at the end? [code] #!/bin/bash ... for (( c=1; c<=3; c++)) do read -p "Please insert Grade #$c:" GRD$c LetterGrade $GRD echo done ...[/code] [/QUOTE] One …

Member Avatar for eggi
0
126
Member Avatar for lehe

Without the backslash, the shell checks to see if there is an alias for the command. If so, it uses it. With the backslash, the shell skips this check and runs the first version of the command that it finds in $PATH. N

Member Avatar for Fest3er
0
141
Member Avatar for VIeditorlover

Half of programming is learning to be an able toolsmith. :) If no such tool exists, you'll have to make your own, perhaps using a pair of existing tools: sed and m4:[list][*]sed() transforms the input to a form m4() can understand[*]m4() 'replaces' the macros with suitable PHP code. But then, …

Member Avatar for Fest3er
0
121
Member Avatar for sacarias40
Member Avatar for mwasif
0
86
Member Avatar for JAA149

Clients never reference cases or invoices. Invoices can be related to many clients. Invoices can be related to many cases. Cases can be related to many clients. Cases can be related to many invoices. So:[list][*]Clients, cases and invoices never reference each other.[*]Case relations reference many clients.[*]Case relations reference many invoices.[*]Invoice …

Member Avatar for Fest3er
0
76
Member Avatar for jhatter

[QUOTE=jhatter;774612]... If I view it online, on a Mac in Firefox everything appears OK. If I view it in Safari from my hard drive everything appears OK. But If I view it online, on a Mac in Safari the link text "Enter Flash Site" is larger and in grey! If …

Member Avatar for MidiMagic
0
147
Member Avatar for BHance

[QUOTE=BHance;773256]Thanks for the response robothy, I should have stated my problem a little more clearly. The problem is that the script timeouts before the whole set of data is finished. Also, if I try entering the data in one long query, mysql timeouts. The most efficient way I have found …

Member Avatar for Fest3er
0
142
Member Avatar for finance-blog

[QUOTE=finance-blog;770714]I have a query that gets 5 random values out of a table according to a query. i.e. [code=sql]SELECT * FROM links WHERE url contra = FALSE ORDER BY rand() LIMIT 0,5[/code] This is fairly simplified but you get the idea. One of the fields in the table is ip, …

Member Avatar for Fest3er
0
57
Member Avatar for komrad

I don't know if there is anything built into MySQL to do this. It's been a while since I've had to 'track' autoincrement values, but that's where you can look. But you can get close using autoincrement. Basically, you create a table where the question_id is an auto-increment value. You …

Member Avatar for Fest3er
0
147
Member Avatar for serkan sendur

It's all about perception and interpretation. Think of the world of software as being entirely virtual. Said slightly differently, a physical representation of software is simply a translation to that medium. If you print your C source code on paper, you are translating your source code to ink on paper; …

Member Avatar for serkan sendur
0
213
Member Avatar for shouvik.d

The only thing I can think to try is to find exactly where the .bat file is created and remove 'DELETE' privilege from that directory for all users (via Properties, Security tab and Advanced button. That *might* prevent the program from deleting the .bat script. Or rename cmd.exe to cmd-real.exe …

Member Avatar for Fest3er
0
574
Member Avatar for Blackeagle

[QUOTE=Blackeagle;764342]yeah i want to delete the line with word green. your command did work well but it doesnt change the original text file, it rather sends the new edited text to the newfile. is there any way i can change the same file i'm using and save the cahnges? and …

Member Avatar for Salem
0
123
Member Avatar for wmuldoon

The following may be closer to what you want: [code] lsof | grep QuarkXP \ | cut -c76- \ | sort | uniq \ | awk '{ printf("\"%s\"\n", $0)}' > /tmp/output1 [/code] The cut(1) deletes everything but the filename. Awk then prints the quoted filenames to the output file. To …

Member Avatar for wmuldoon
0
254
Member Avatar for welbyobeng

You're on your own for accessing the MySQL server. The following statements usually work for creating databases and tables: [code]create database; use; create table a (field1, field2, ..., key);[/code] Download the MySQL manual (PDF) and peruse the syntax of the aforementioned statements. I taught myself MySQL by RTFMing, though I …

Member Avatar for Fest3er
0
151
Member Avatar for johnwayne77

[QUOTE=johnwayne77;764050]... i have a prepay online store and i advertised a contest to win a free code when buying at least 5 codes during 24.11-24.12 2008 period. ... any ideas?[/QUOTE] This is pseudo-codeish so you have to RTFM and google to make it work. :) You need to use count() …

Member Avatar for Fest3er
0
142
Member Avatar for confusedGirl

[QUOTE=confusedGirl;763306]As a beginner, I designed a website using php, but unfortunately I found difficulty with 3 codes. I have already written them but am not sure why they didn't work ....[/QUOTE] I'll remark on the first proggy. A few obligatory questions. How is the status getting from the browser to …

Member Avatar for Fest3er
0
97
Member Avatar for jagr200

[QUOTE=jagr200;761666]hey all. Im writing a small script that is supposed to check for a file or directory and when its not there create it. After it creates the file or directory I would like the script to loop to the beginning but I cant figure it out. What am I …

Member Avatar for Fest3er
0
97
Member Avatar for hajjo

This problem isn't necessarily intuitive, but can be solved by looking at how shells handle pipelines: they exec the last things in the pipe first. Unlike human society, unix/linux/posix speakers (writers) suffer a horrible fate if they speak when there are no listeners (readers) unless, of course, the speakers (writers) …

Member Avatar for Fest3er
0
117
Member Avatar for chris5126

bc(1) is your friend. It computes to arbitrary precision. "-e" tells bash to interpret \x sequences; ksh might not need it. [code] . . . integer read=`echo -e "scale=2\n$rBytes/1000000" | bc` integer write=`echo -e "scale=2\n$wBytes/1000000" | bc` . . . [/code]

Member Avatar for Fest3er
0
137
Member Avatar for ggeoff

[QUOTE=ggeoff;734601]... The proposal is that a couple of old drives can still be used with little risk ...[/QUOTE] A seven year old disk drive? I would trust it to be useful for testing and for educational/training purposes. But given a choice between using old drives for my system and data …

Member Avatar for ggeoff
0
230
Member Avatar for f.ben.isaac

[QUOTE=f.ben.isaac;734559]I'm wondering, if compilers are written in human readable way, then how come the machine could read the compiler? If machine could read the compiler - which is by itself is not a machine language, why don't the machine just read the high level programming language directly? As it is …

Member Avatar for Stefano Mtangoo
0
298

The End.