
PravinS
-
Posts
459 -
Joined
-
Last visited
-
Days Won
2
Posts posted by PravinS
-
-
That solution isn't going to quite work since $row{"visivel"} comes from the first query.
@magcr23 - That first query probably is not necessary. The update query will only change visivel when it is equal to zero.
If you need to show the message about the product already being shown, you could use mysql_affected_rows(). More information about the function can be found here:
oh sorry, i missed that
-
You missed mysql_query() for UPDATE query, also SELECT query should be below UPDATE query, so you will get updated data
<?php require("bd/conexao.php"); if ($row{"visivel"}== 0) { $update= "UPDATE produtos SET visivel = 1 WHERE visivel = 0"; mysql_query($update); echo $update; } else { echo "o produto ja esta visivel"; } $sql = "SELECT * FROM produtos"; $resultado = mysql_query($sql); $row = mysql_fetch_array($resultado); ?>
-
Try this query
SELECT username, count(username) AS post_count FROM TABLE_NAME GROUP BY username ORDER BY count(username) DESC;
you can apply LIMIT to get top records, as query will give sorted result according to max post count of user.
-
you need to use
$result = mysqli_query($link, $query);
before
$result_array = mysqli_fetch_array($result);
or check this URL: http://php.net/manual/en/mysqli-result.fetch-array.php
-
have you restarted the XAMPP after updating the php.ini file?
if yes, then it should work
-
SELECT TOP is not supported in MySQL, you need to use LIMIT
try this
SELECT ID, Name, Score FROM Scores ORDER BY Score DESC LIMIT 10
-
-
mysql_connect() function is not supported in PHP 5.5.0 and your PHP version may have been upgraded to 5.5.0
check this url: http://php.net/manual/en/function.mysql-connect.php
-
echo tha $_POST['who] value at the top and check what value you are getting after submitting the form.
-
Yes, use AJAX to get current quantity($qty) value
-
Try this:
echo date("m",strtotime('2014-08-20 07:32:20'));
-
Try TCPDF
-
for PHP SOAP you can try NuSOAP Toolkit
-
you can use AJAX
-
you can check it in jsfiddle for the output
-
search the following line
html += '<td>' + i + '</td>';
and replace it with
if (i == d.getDate()) html += '<td style="color:blue;">' + i + '</td>'; else html += '<td>' + i + '</td>';
-
Use
$result = json_decode($string,true);
you will get $result in array format
-
Check this simple logic
<table border="0" cellspacing="0" cellpadding="5"> <tr> <?php $array = array(1,2,3,4,5,6); $i = 1; foreach($array as $val) { echo '<td>'.$val.'</td>'; if ($i % 2 == 0) echo "</td></tr>"; $i++; } ?> </tr> </table>
I hope this will help you
-
you have only 1 while loop and 2 endwhile
-
You can use it like this also
<?php $link = '<a href="post?id='.$id.'&title='.$slug_title.'">'.$title.'</a>'; ?>
-
you need to check the MySQL query
$query = urldecode($query);
echo the above line and check the query
-
try FCKeditor or TinyMCE
-
why do you want to split the form, it can be done in single form
-
you have used "Like" as column name, it is reserved word in mysql
html php form problem
in PHP Coding Help
Posted · Edited by PravinS
use quotes around option value or use select box as
hope this will help you