草庐IT

undefine

全部标签

php - MySQL PHP undefined offset 错误

我在MySQL中有一个名为lynked_v1的表和一个名为probability_single_free的列+----------------------------------+|id|probability_single_free||---------------------------------||0|100.00||1|100.00||2|100.00||3|100.00||4|100.00||5|100.00||6|100.00||7|100.00|+----------------------------------+我正在尝试使用以下命令回显每一行:$row[0]在屏幕

mysql - Steam 交易机器人 - TypeError : Cannot read property '0' of undefined

所以,我处境艰难。我目前正在使用Steam机器人试试运气,但我遇到了一个似乎无法自行解决的问题。首先,我想说当我使用在别处托管的数据库时这有效,但是当我使用在本地主机上运行的MySQL服务器时,就会出现这个问题。问题如下:/home/bot1/node_modules/mysql/lib/protocol/Parser.js:82throwerr;^TypeError:Cannotreadproperty'0'ofundefinedatQuery._callback(/home/bot1/bot1.js:711:143)atQuery.Sequence.end(/home/bot1/n

php - 第 68 行的 fatal error : Undefined class constant 'MYSQL_ATTR_SSL_CA' in/var/www/laravel/config/database. php

在使用laravel设置docker容器后,我在浏览器中收到以下错误:fatalerror:第68行/var/www/laravel/config/database.php中未定义的类常量“MYSQL_ATTR_SSL_CA”这一行的内容:PDO::MYSQL_ATTR_SSL_CA=>env('DB_MYSQL_ATTR_SSL_CA',''),这是来自PHP5的Debian官方镜像,包括php5-mysql(基于Debian页面https://packages.debian.org/jessie/php5-mysql,包括phpcommons5.6.30,如果我是正确的,应该足够了

php - 连接两个表时出现 "Message : Undefined Variable:query "错误 codeigniter mysql php

我有两个名为“addexpense”和“addcategory”的表。我已成功加入每个表,但在我的View页面上未查看数据并且屏幕上传递了一条错误消息。请帮忙。这是我的模型publicfunctiongetExpenses(){$this->db->select("addexpense.exp_date,addexpense.exp_amount,addexpense.exp_note,addexpense.exp_created,addcategory.category_name");$this->db->from('addexpense');$this->db->join('add

mysql - 流畅的查询生成器中的 undefined variable

我开始使用Laravel框架,但我对流畅的查询构建器有疑问。在where条件下,如果我使用原始值或Input::get(),它会检索结果并正确执行,但当我使用分配的变量时,它会显示“undefinedvariable”错误。$properties=Listing::where(function($query){if(Input::has('property-type'))$query->where('property_type','=',Input::get('property-type'));})->get();它工作正常,但如果我这样做$pt=Input::get('propert

php - PHP - “通知: undefined variable :行” - 无法获取MySQL的记录

这个问题已经有了答案:“Notice:Undefinedvariable”,“Notice:Undefinedindex”,and“Notice:Undefinedoffset”usingPHP28个答案这是我在网上的第一个编程问题。我已经做了一些研究,试图改变一些东西,但到目前为止,没有解决我的问题。我有以下代码:$sql="SELECT*FROMtb_carros_of";$result=mysqli_query($con,$sql)ordie("Error:".mysqli_error($con));while($row=mysqli_fetch_array($result)){

PHP - 通知 : Undefined variable happening twice

我在加载页面时遇到以下两个错误:Notice:Undefinedvariable:realtorinC:\ProgramFiles\EasyPHP-5.3.9\www\cglst\images\addform.phponline255和Notice:Undefinedvariable:phoneinC:\ProgramFiles\EasyPHP-5.3.9\www\cglst\images\addform.phponline256不过,我确实定义了这两个变量,所以我不明白为什么会出现这些错误。这是我的代码:functionaddListing(){//ifdatawasprovided

php - Laravel 关系错误:Undefined property: Illuminate\Database\Eloquent\Collection::$id on line 1

我有两个模型Company和Employee,在MySQL中有相应的表,companies和employees。我定义了这些多对一关系:在Company模型中:publicfunctionemployees(){return$this->hasMany('App\Employee','company');}在Employee模型中:publicfunctioncompany(){return$this->belongsTo('App\Company','company');}上述方法中的company是employees表中存在的无符号整数外键。在tinker中,我尝试了$compan

php - PDO 抛出通知 : Undefined index when using fetchAll in a WHILE loop

我是PHP领域的新手,我需要一些帮助。我正在尝试从数据库中提取数据,我正在使用PDO来完成它。我有以下PHP代码但没有成功,返回错误通知:$pairingsistem='1';$pecahan='1';if($pairingsistem=="1"){$skrg=time();$tablaz=$pdo->query("SELECT*FROMtb_ghwheresaldo>0andstatus='pending'orderbyidASClimit0,1");while($registroz=$tablaz->fetchAll(PDO::FETCH_ASSOC)){//use$results

php - 通知 : Undefined index: variable

我正在尝试构建以下表单:NameEmailIneedsomeinformationregarding:*Whatis2+2?(Anti-spam)PHP代码:Yourmessagehasbeensent!';}else{echo'Somethingwentwrong,gobackandtryagain!';}}elseif($_POST['submit']&&$human!='4'){echo'Youansweredtheanti-spamquestionincorrectly!';}if($_POST['submit']){if($name!=''&&$email!=''){if($