Search Results

Showing results 1 to 21 of 21
Search took 0.01 seconds.
Search: Posts Made By: spthorn
Forum: PHP 34 Days Ago
Replies: 4
Views: 195
Posted By spthorn
Is the select box preloaded with data? If so, this thread may be of help to you: http://stackoverflow.com/questions/147839/cognos-8-javascript-to-select-values-in-a-multi-select-list-box-prompt

If...
Forum: MySQL 34 Days Ago
Replies: 2
Solved: help - ordering
Views: 356
Posted By spthorn
This was a good exercise! This code will do what you want:

select #localizacao.*, #cliente.*, #dispositivo.*
FROM #dispositivo
join #localizacao on #localizacao.local_disp_id =...
Forum: MySQL Oct 22nd, 2009
Replies: 2
Views: 388
Posted By spthorn
The INNER JOIN will only display data found in both the joined tables. Perhaps your staff_declare, staff_post and staff_department are sparse?
Forum: MySQL Oct 22nd, 2009
Replies: 1
Views: 348
Posted By spthorn
I'm guessing you are executing the CREATE code over again. Be sure to DROP TABLE Job_Title before creating it again.
Forum: MySQL Jul 24th, 2009
Replies: 2
Views: 402
Posted By spthorn
SELECT a.departure, a.arrival, 0 AS connections, price AS cost FROM flights AS a WHERE a.departure = 'Chicago' OR a.departure = 'New York'
UNION
SELECT r.departure, b.arrival, r.connections + 1,...
Forum: MySQL Jul 24th, 2009
Replies: 3
Views: 538
Posted By spthorn
No workaround is available via PHP. That wouldn't make sense; allowing PHP to somehow override firewall settings would be somewhat dangerous. :-)

If you can't access the db server, the firewall...
Forum: PHP Jul 24th, 2009
Replies: 7
Views: 421
Posted By spthorn
Forum: PHP Jul 24th, 2009
Replies: 5
Views: 1,165
Posted By spthorn
Hmmm. That's some kinda odd code there. Let's do a quick rewrite:

$sql = "SELECT prodMFG FROM productDetail WHERE prodMFG != '' GROUP BY prodMFG"; // (1)
$result = mysql_query($sql);
echo "<form...
Forum: PHP Jul 23rd, 2009
Replies: 9
Views: 304
Posted By spthorn
Some random thoughts...

I'd recommend just getting in there and writing code! That's the fastest way to learn. Pick a project - even something that's been done many times before - and write it....
Forum: PHP Jul 23rd, 2009
Replies: 9
Views: 12,209
Posted By spthorn
Since your bug was a syntax one, you might consider an IDE. See http://www.ibm.com/developerworks/library/os-php-ide/index.html for a list of suggestions. However, there can be a tendency to rely on...
Forum: PHP Jul 23rd, 2009
Replies: 7
Views: 381
Posted By spthorn
Looks like you're not properly connecting to the database. But I can't very well test that - looks like the db connection code is in your include file.
Forum: PHP Jul 23rd, 2009
Replies: 5
Views: 688
Posted By spthorn
I think your logic's just reversed. I'd do something like this:


if (mysql_numrows($exist) > 0)
echo "There are ".mysql_numrows($exist)." users with that name.";
Forum: PHP Jul 23rd, 2009
Replies: 9
Views: 12,209
Posted By spthorn
The following line has parenthesis issues:

if(mysql_num_rows(($wisher)<1)){

It should be:

if(mysql_num_rows($wisher)<1){
Forum: PHP Jul 23rd, 2009
Replies: 8
Views: 358
Posted By spthorn
The host should not make any difference!

Please give us the URL (put just this code in a file, if you like).

I put your code (simplified) in here - http://www.spthorn.dev/aaa.php - does that...
Forum: PHP Jul 23rd, 2009
Replies: 7
Views: 381
Posted By spthorn
That's because you added a condition that if both the First and Last name are blank, just go to the original page. This condition is always true because you didn't give the "last" field a name:


...
Forum: PHP Jul 22nd, 2009
Replies: 9
Views: 12,209
Posted By spthorn
Chand, your code is obviously NOT ok. :-) Please paste your code in this or another thread for us to review.
Forum: PHP Jul 22nd, 2009
Replies: 7
Views: 381
Posted By spthorn
Go back to line 11 - there's an extra double-quote in there.
Forum: PHP Jul 22nd, 2009
Replies: 5
Views: 452
Posted By spthorn
There's some logic missing in all this code. I'd suggest sitting down and writing out pseudocode to cover all the options and THEN coding. Something like this:


if (studentid doesn't exist)
add...
Forum: PHP Jul 22nd, 2009
Replies: 8
Views: 358
Posted By spthorn
I suspect it's not an HTML marquee. Please post the relevent code.
Forum: PHP Jul 22nd, 2009
Replies: 5
Views: 718
Posted By spthorn
Karin,

I see a couple problems.

First, you're not accessing the right column name for the color. The SELECT statement says it's 'colorinfo', but when you access it, it's as 'color'. Change the...
Forum: PHP Jul 22nd, 2009
Replies: 9
Solved: Delete Row
Views: 493
Posted By spthorn
Here's the consensus:

if(isset($_GET['id']))
{
$con = mysql_connect("localhost","r","123456");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
Showing results 1 to 21 of 21

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC