Satria Ox41464b
Members-
Posts
18 -
Joined
-
Last visited
Never
Everything posted by Satria Ox41464b
-
I dont see your code sending Query ($q) to mysql_query()
-
sob... compare: [quote="zsxdcfv21"]130 function resultHasRows () 131 { 132 $numRows = mysql_num_rows( $this->resultResource ); 133 if ( $numRows == 0 ) return false; 134 return true; 135 }[/quote] with [quote="Satria Ox41464b"]130 function resultHasRows () 131 { 132 $numRows = mysql_num_rows( $this->resultResource ); 133 if ( [b]$numRows[/b] ) return [b]true[/b]; 134 return [b]false[/b]; 135 }[/quote]
-
duh... after seeing your code... im not sure which part wrong... mostly because im not familiar with [code](true == $something)[/code] and [code]($something == 0)[/code] a part of that considering that your mysql_num_rows() is 0, thats mean you should return false; (your first post) but why on your next code its always true um... i guess i found it please modify [b]Line 133 and 134[/b] 130 function resultHasRows () 131 { 132 $numRows = mysql_num_rows( $this->resultResource ); 133 if ( [b]$numRows[/b] ) return [b]true[/b]; 134 return [b]false[/b]; 135 }
-
get pencil and paper... draw your code in there... if (...) <- [b]Your condition is taken here[/b] { ... [b]and not here[/b] } else { $notes = 'No Notes to Display.'; }
-
$numRows = [b]@[/b]mysql_num_rows( $this->resultResource );
-
[code]<?php $q = "SELECT * FROM cars"; $qr = mysql_query($q) or die(mysql_error()); $r = mysql_fetch_assoc($qr); // <- You already get one row here echo '<strong>Select a link category</strong><br />'; while($r = mysql_fetch_assoc($qr)){ // and ofcourse overhere total loops will be minus one of total rows echo '<a href="links.php?do=listlinks&cat='.$r['name'].'">'.$r['name'].'</a><br />'; } // while ?>[/code]
-
[code]<?php //if we got this "No definitions were found for" inside our $content if (strpos($content, 'No definitions were found for')) echo 'cant find definition'; ?>[/code]
-
have you check http://php.net/outcontrol ?
-
check how upload working first http://php.net/manual/en/features.file-upload.php
-
make sure what behind $trans and $balance with: [code]<?php var_dump($trans); var_dump($balance);?>[/code]
-
If you not sure with something... consult Manual its simply easy: http://php.net/REPLACE_ME_WITH_YOUR_UNKNOWN_FUNCTION Example: http://php.net/error_reporting
-
@superhoops: there is several MAGIC can help you debugging [code]<?php //Magic #1 error_reporting(E_ALL); //Magic #2 echo $sql; //Magic #3 mysql_query($sql) or die (mysql_error()); ?>[/code]
-
[b]Column count doesn't match value count[/b] INSERT INTO users [i]//this section is COLUMN count[/i] (name, email1, email2, daytime, nighttime, mobile, streetnum, streetname, suburb, state, postcode, askprice, bedrooms, bathrooms) [i]//total 14 column[/i] VALUES [i]//this section is VALUE count[/i] ('Daniel', 'ashis', 'hioahiodf', '12412', '1345145', '15151515', '15123', 'suburb', 'state', 'postcode', 'askprice', 'bedrooms', 'bathrooms') [i]//total 13 column[/i]
-
Your example is comparing Integer. and that code should be working like what you expect
-
fwrite() and fclose() not valid stream resource?
Satria Ox41464b replied to Unholy Prayer's topic in PHP Coding Help
<input type="hidden" name="filename" value="bbultimate.css"> and $_POST['bbultimate.css'] i guess you should put $_POST['filename'] -
Always check manual first, http://php.net/session_set_save_handler and read the Error message. "Argument 2 needs valid callback" and from your pastebin, seems like you didnt have anything for 2nd Argument [code]session_set_save_handler("sess_mysql_open", "", //<- need valid callback here "sess_mysql_read", "sess_mysql_write", "sess_mysql_destroy", "sess_mysql_gc");[/code]Where is 2nd argument? you only put ""
-
Call a function without halting execution
Satria Ox41464b replied to 2705ap's topic in PHP Coding Help
Take a look at [url=http://php.net/pcntl]Process Control Functions[/url] -
works perfect here... what about a(); at the end of your index.php ?