Parašė zygisn· 2011 Lie. 4 17:07:40
#1
Sveiki, gal buvote susidure sia situacija ir zinote kaip ja isspresti
Stai gaunamas warning'as:
Warning: mysql_fetch_object(): supplied argument is not a valid <span style="border-bottom: 1px dotted black;">MySQL</span> result resource in C:\xampp\htdocs\bandom.php on line 30
Kodas:
<?php
mysql_connect('localhost', 'root', '');
@mysql_select_db(a) or die ("No database");
$query = "SELECT * FROM `aa`";
$result = mysql_query($query);
if (isset ($_POST['tekstas']))
{
$pos = strpos($_POST['tekstas'], ' ');
if($pos > 0){
print "Prasome ivesti viena zodi.";
}else {
$query = "INSERT INTO `aa` {'id', 'tekstas',} VALUES (NULL, '".$_POST."'";
mysql_query($quert) or die(mysql_error());
}
}
$query = "SELECT * FROM 'zodziai'";
$result = mysql_query($query);
while( $row = mysql_fetch_object($result)){
print_r($row);
print '<br/>';
}
?>
30 - oji eilute paryskinta
MYSQL error:
Parse error: syntax error, unexpected T_LOGICAL_OR in C:\xampp\htdocs\bandom.php on line 30
Bandziau googlintis, bet ne kazin kaip supratau, kaip sia beda isspresti ?|
Redagavo zygisn· 2011 Lie. 4 18:07:01
Parašė avice· 2011 Lie. 4 18:07:39
#2
$query = "SELECT * FROM 'zodziai'" cia blogai megink keist i
$query = "SELECT * FROM zodziai`"; arba isvis nera tokios lenteles
Parašė zygisn· 2011 Lie. 4 18:07:49
#3
avice parašė:
$query = "SELECT * FROM 'zodziai'" cia blogai megink keist i
$query = "SELECT * FROM zodziai`"; arba isvis nera tokios lenteles
Nepadejo. Tokia lentele yra.